dev-cpp-users Mailing List for Dev-C++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
1
|
2
(1) |
3
(2) |
4
|
5
(1) |
6
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
15
(1) |
16
|
17
|
18
|
19
|
20
|
21
(2) |
22
|
23
|
24
(2) |
25
(4) |
26
(4) |
27
|
28
|
29
|
30
(2) |
From: Jordan B. <jor...@me...> - 2011-04-30 16:30:52
|
Here is my code thus far. I need a algorithm for the function that sorts the list( it is the very last function). I know there is a simple way to do this since it is a linked list. Any help I would gratefully welcome. #include <iostream> #include <cstdlib> #include <cstring> using namespace std; const int MAX_WORD_LENGTH = 80; /* definition of a node */ struct Node; typedef Node *Node_ptr; struct Node { char word[MAX_WORD_LENGTH]; Node_ptr ptr_to_next_node; }; /* Function to assign a linked list to "a_node" */ void assign_list(Node_ptr &a_list); /* Function to assign a new dynamic node variable to "a_node" */ void assign_new_node(Node_ptr &a_node); /* Function to print the strings in the list "a_node" */ void print_list(Node_ptr a_node); void add_after(Node_ptr &list, char a_word[], char word_after[]); //This function inserts a node containing "word_after" in the linked list "list", after the first occurrence of a node containing "a_word". If "list" does not contain such a node, the function leaves it unchanged. void delete_node(Node_ptr &a_list, char a_word[]); //This function deletes the first node in "a_list" which contains "a_word" |
From: Jordan B. <jor...@me...> - 2011-04-30 16:23:58
|
Below is the code I have thus far for my program. I am now in need of a method to sort this linked list alphabetically. The functioning that will handle this is "list_selection_sort()". Does any one have an Idea. I know that I could do it by copying each word from the linked list and sort them in an array and use a loop to link them all together but that is copying too much and using too many of the computers resources. I know there is a simple algortihm for this since the list is a linked list. #include <iostream> #include <cstdlib> #include <cstring> using namespace std; const int MAX_WORD_LENGTH = 80; /* definition of a node */ struct Node; typedef Node *Node_ptr; struct Node { char word[MAX_WORD_LENGTH]; Node_ptr ptr_to_next_node; }; /* Function to assign a linked list to "a_node" */ void assign_list(Node_ptr &a_list); /* Function to assign a new dynamic node variable to "a_node" */ void assign_new_node(Node_ptr &a_node); /* Function to print the strings in the list "a_node" */ void print_list(Node_ptr a_node); void add_after(Node_ptr &list, char a_word[], char word_after[]); //This function inserts a node containing "word_after" in the linked list "list", after the first occurrence of a node containing "a_word". If "list" does not contain such a node, the function leaves it unchanged. void delete_node(Node_ptr &a_list, char a_word[]); //This function deletes the first node in "a_list" which contains "a_word" |
From: Michal M. <mol...@se...> - 2011-04-26 20:19:44
|
if(strcmp(word_after,currNode->word)) should be if(strcmp(word_after,currNode->word) == 0) |
From: Per W. <pw...@ia...> - 2011-04-26 20:14:36
|
Don't you have access to a debugger? With a debugger, you can single-step the code and see yourself where the program does something that you didn't expect. You seem to have fixed the error where you used one of the parameters to the insert_after() both to locate where to insert and as the new string to insert. When your code "always" (it doesn't really) inserts the word directly after the first word in the list (which isn't true really) then it must be quite reasonable to suspect the code that performs the string comparison. However, you haven't read the manual for strcmp(). if(strcmp(word_after,currNode->word)) strcmp will return three different alternatives: less than zero equal to zero greater than zero Quite logical since the two strings you send in as parameters may be smaller than, equal to, or larger than each other. Your goal is to find a match, i.e. equal. If you google "man strcmp" you would notice that strcmp() returns zero when the two strings are matching. Your if statement on the other hand gets activated if strcmp() returns non-zero, i.e. that the word is greater than or smaller than the word you are looking for. But a more interesting question here - besides your incorrect use of the result from strcmp() is why you mix C and C++ like you do. You are using C++ constructs to read input and print output. But you are not using the C++ string data type for text strings. Instead, you are using the character arrays available in C. What happens if you read in a longer word than your fixed-size character arrays can store? Your previous code used strncpy() - but that one will not zero-terminate strings that are too big to fit. Now you have strcpy() that don't care at all about available space. And the input from cin will not know how many characters that fits. /pwm On Tue, 26 Apr 2011, Jordan Burnam wrote: > Hi everyone, > > I have the following program that I have created and am trying > to get this work correctly. The purpose of this program is to make a > litst from the users input then allow the user to add a word after a > word in the list. So far this list only adds the word after the first > word each time. I have looked at it and ad peers online to view it and > have advised me that I have used a variable twice and that is what is > causing this but I am not catching it. I am confident that it is in the > function "add_after" as this is the function called to add after a word. > I have hand traced a couple of times but with no avail. Could somone > please point out my logic error. > > <code> > #include <iostream> > #include <cstdlib> > #include <cstring> > using namespace std; > const int MAX_WORD_LENGTH = 80; > /* definition of a node */ > struct Node; > typedef Node *Node_ptr; > struct Node > { > char word[MAX_WORD_LENGTH]; > Node_ptr ptr_to_next_node; > }; > /* Function to assign a linked list to "a_node" */ > void assign_list(Node_ptr &a_list); > /* Function to assign a new dynamic node variable to "a_node" */ > void assign_new_node(Node_ptr &a_node); > /* Function to print the strings in the list "a_node" */ > void print_list(Node_ptr a_node); > ã > void add_after(Node_ptr &list, char a_word[], char word_after[]); > //This function inserts a node containing "word_after" in the linked list "list", after the first occurrence of a node containing "a_word". If "list" does not contain such a node, the function leaves it unchanged. > //***************************************************** > void main() > { > char word_a[MAX_WORD_LENGTH]; > char aword[MAX_WORD_LENGTH]; > Node_ptr my_list = NULL; > assign_list(my_list); > cout << "\nTHE LIST IS NOW:\n"; > print_list(my_list); > cout << "After which word would you like to add a word?:"; > cin >> word_a; > cout << "What word would you like to add after that word?:"; > cin >> aword; > add_after(my_list,aword, word_a); > cout << "The list is now:"<< endl; > print_list(my_list); > system("pause"); > ã > ã > ã > } > //***************************************************** > /* DEFINITION OF FUNCTION "assign_list" */ > void assign_list(Node_ptr &a_list) > { > Node_ptr current_node, last_node; > assign_new_node(a_list); > cout << "Enter first word (or '.' to end list): "; > cin >> a_list->word; > if (!strcmp(".",a_list->word)) > { > delete a_list; > a_list = NULL; > } > current_node = a_list; > while (current_node != NULL) > { > assign_new_node(last_node); > cout << "Enter next word (or '.' to end list): "; > cin >> last_node->word; > if (!strcmp(".",last_node->word)) > { > delete last_node; > last_node = NULL; > } > current_node->ptr_to_next_node = last_node; > current_node = last_node; > } > } > /* END OF FUNCTION DEFINITION */ > /* DEFINITION OF FUNCTION "assign_new_node" */ > void assign_new_node(Node_ptr &a_node) > { > a_node = new Node; > if (a_node == NULL) > { > cout << "sorry - no more memory\n"; > exit(1); > } > } > //***************************************************** > /* DEFINITION OF FUNCTION "print_list" */ > void print_list(Node_ptr a_node) > { > while (a_node != NULL) > { > cout << a_node->word << " "; > a_node = a_node->ptr_to_next_node; > } > } > //***************************************************** > void add_after(Node_ptr &list, char a_word[], char word_after[]) > { > Node_ptr currNode; > Node_ptr newNode; > Node_ptr nextNode; > currNode = list; > while(currNode ->ptr_to_next_node != NULL) > { > if(strcmp(word_after,currNode->word)) > { > assign_new_node(newNode); > nextNode = currNode ->ptr_to_next_node; > currNode ->ptr_to_next_node = newNode; > newNode ->ptr_to_next_node = nextNode; > strcpy (newNode ->word,a_word); > break; > } > else > currNode = currNode -> ptr_to_next_node; > } > } > </code> |
From: Jordan B. <jor...@me...> - 2011-04-26 19:02:31
|
Hi everyone, I have the following program that I have created and am trying to get this work correctly. The purpose of this program is to make a litst from the users input then allow the user to add a word after a word in the list. So far this list only adds the word after the first word each time. I have looked at it and ad peers online to view it and have advised me that I have used a variable twice and that is what is causing this but I am not catching it. I am confident that it is in the function "add_after" as this is the function called to add after a word. I have hand traced a couple of times but with no avail. Could somone please point out my logic error. <code> #include <iostream> #include <cstdlib> #include <cstring> using namespace std; const int MAX_WORD_LENGTH = 80; /* definition of a node */ struct Node; typedef Node *Node_ptr; struct Node { char word[MAX_WORD_LENGTH]; Node_ptr ptr_to_next_node; }; /* Function to assign a linked list to "a_node" */ void assign_list(Node_ptr &a_list); /* Function to assign a new dynamic node variable to "a_node" */ void assign_new_node(Node_ptr &a_node); /* Function to print the strings in the list "a_node" */ void print_list(Node_ptr a_node); void add_after(Node_ptr &list, char a_word[], char word_after[]); //This function inserts a node containing "word_after" in the linked list "list", after the first occurrence of a node containing "a_word". If "list" does not contain such a node, the function leaves it unchanged. //***************************************************** void main() { char word_a[MAX_WORD_LENGTH]; char aword[MAX_WORD_LENGTH]; Node_ptr my_list = NULL; assign_list(my_list); cout << "\nTHE LIST IS NOW:\n"; print_list(my_list); cout << "After which word would you like to add a word?:"; cin >> word_a; cout << "What word would you like to add after that word?:"; cin >> aword; add_after(my_list,aword, word_a); cout << "The list is now:"<< endl; print_list(my_list); system("pause"); } //***************************************************** /* DEFINITION OF FUNCTION "assign_list" */ void assign_list(Node_ptr &a_list) { Node_ptr current_node, last_node; assign_new_node(a_list); cout << "Enter first word (or '.' to end list): "; cin >> a_list->word; if (!strcmp(".",a_list->word)) { delete a_list; a_list = NULL; } current_node = a_list; while (current_node != NULL) { assign_new_node(last_node); cout << "Enter next word (or '.' to end list): "; cin >> last_node->word; if (!strcmp(".",last_node->word)) { delete last_node; last_node = NULL; } current_node->ptr_to_next_node = last_node; current_node = last_node; } } /* END OF FUNCTION DEFINITION */ /* DEFINITION OF FUNCTION "assign_new_node" */ void assign_new_node(Node_ptr &a_node) { a_node = new Node; if (a_node == NULL) { cout << "sorry - no more memory\n"; exit(1); } } //***************************************************** /* DEFINITION OF FUNCTION "print_list" */ void print_list(Node_ptr a_node) { while (a_node != NULL) { cout << a_node->word << " "; a_node = a_node->ptr_to_next_node; } } //***************************************************** void add_after(Node_ptr &list, char a_word[], char word_after[]) { Node_ptr currNode; Node_ptr newNode; Node_ptr nextNode; currNode = list; while(currNode ->ptr_to_next_node != NULL) { if(strcmp(word_after,currNode->word)) { assign_new_node(newNode); nextNode = currNode ->ptr_to_next_node; currNode ->ptr_to_next_node = newNode; newNode ->ptr_to_next_node = nextNode; strcpy (newNode ->word,a_word); break; } else currNode = currNode -> ptr_to_next_node; } } </code> |
From: João M. R. S. T. <ta...@fe...> - 2011-04-26 17:03:39
|
---------------------------------------------------------------------------- ------------------------------------------------------- International ECCOMAS Thematic Conference VipIMAGE 2011 - III ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING 12-14th October 2011, Olhão, Algarve, Portugal <http://www.fe.up.pt/~vipimage> www.fe.up.pt/~vipimage LAST POSTPONEMENT We would appreciate if you could distribute this information by your colleagues and co-workers. ---------------------------------------------------------------------------- ------------------------------------------------------- Dear Colleague, Due to several requests, we have postponed the submission deadline to May 15, 2011. We would like to invite you to share your work in the International Conference VipIMAGE 2011 - III ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING that will be held in Real Marina Hotel & Spa, Olhão, Algarve, Portugal, on October 12-14, 2011. Possible Topics (not limited to) - Signal and Image Processing - Computational Vision - Medical Imaging - Physics of Medical Imaging - Tracking and Analysis of Movement - Simulation and Modeling - Image Acquisition - Shape Reconstruction - Objects Segmentation, Matching, Simulation - Data Interpolation, Registration, Acquisition and Compression - 3D Vision - Virtual Reality - Software Development for Image Processing and Analysis - Computer Aided Diagnosis, Surgery, Therapy, and Treatment - Computational Bioimaging and Visualization - Telemedicine Systems and their Applications Invited Lecturers - Armando J. Pinho - University of Aveiro, Portugal - Irene M. Gamba - The University of Texas at Austin, USA - Marc Pollefeys - ETH Zurich, Switzerland - Marc Thiriet - Universite Pierre et Marie Curie (Paris VI), France - Xavier Roca Marvà - Autonomous University of Barcelona, Spain - Stan Sclaroff - Boston University, USA Thematic Sessions - Simultaneous MR-PET imaging - Satellite image analysis for environmental risk assessment - Dental Imaging and Processing Techniques - Digital Mammography - Imaging of Biological Flows: trends and challenges - Imaging techniques applied to soft tissue Biomechanics Publications The proceedings book will be published by the Taylor & Francis Group and indexed by Thomson Reuters Conference Proceedings Citation Index, IET Inspect and Elsevier Scopus. A book with 20 invited works from the best ones presented in VipIMAGE2011 (extended versions) will be published by Springer. A special issue of The International Journal for Numerical Methods in Biomedical Engineering dedicated to VipIMAGE 2011 (with extended versions of 12 selected works), will be published by John Wiley & Sons. Important dates - Deadline for Extended Abstracts: 15th May 2011 (postponed) - Authors Notification: 31st May 2011 (postponed) - Deadline for Full Papers: 30th June 2011 Awards "best paper award" and "best student paper award" are going to be given to the author(s) of two papers presented at the conference, selected by the Organizing Committee based on the best combined marks from the Scientific Committee and Session Chairpersons. We are looking forward to see you in Algarve next October. Kind regards, João Manuel R. S. Tavares Renato Natal Jorge (conference co-chairs) PS. For further details please see the conference website at: <http://www.fe.up.pt/~vipimage> www.fe.up.pt/~vipimage |
From: Michal M. <mol...@se...> - 2011-04-25 23:58:52
|
There are two additional errors: 1) As already pointed out by Per, you are using a_word instead of word_after in the condition, so the line: if(currNode -> word == a_word) should be: if (strcmp(currNode -> word, word_after) == 0) 2) The infinite loop is because when you found the word you do not change the currNode so the while(currNode != NULL) never becames true. Using break is correct solution you just have to put it right before the else part: if (strcmp(currNode -> word, word_after) == 0) { assign_new_node(newNode); nextNode = currNode ->ptr_to_next_node; currNode ->ptr_to_next_node = newNode; newNode ->ptr_to_next_node = nextNode; strncpy(newNode->word, a_word, MAX_WORD_LENGTH); break; // HERE } else currNode = currNode -> ptr_to_next_node; } (You can as well do currNode = NULL; instead of the break or use return in this case.) Dne 25.4.2011 2:10, jordanburnam1990 napsal(a): > Now I get an infinite loop when using the compare string functions > for the if statement in add_after any ideas? > > Sent from my iPhone > > On Apr 24, 2011, at 4:51 PM, Michal Molhanec<mol...@se...> > wrote: > >> Dne 24.4.2011 20:23, Jordan Burnam napsal(a): >>> if(currNode -> word == a_word) >> >> You cannot compare strings with ==, you'll have to use strcmp() >> function like it is already used inside the assign_list() >> function. >> > > I saw why I had the infinite loop cause it traversed through the > dynamic memory till it found the end which can take a while. So I > added a break statement after the if statement and that has solved > it. But now it adds the name to the wrong place in the list each > time. I know it's a simple logic error but I just can't seem to pin > point it. |
From: Per W. <pw...@ia...> - 2011-04-25 07:04:12
|
Note that your function is using the same word twice in the code - it isn't bothering about the other word. And also - you claim it should insert the new word after the "first" match - but if the function doesn't return after a match, it will insert the new word after every match. /pwm On Sun, 24 Apr 2011, jordanburnam1990 wrote: > Now I get an infinite loop when using the compare string functions for the if statement in add_after any ideas? > > Sent from my iPhone > > On Apr 24, 2011, at 4:51 PM, Michal Molhanec <mol...@se...> wrote: > > > Dne 24.4.2011 20:23, Jordan Burnam napsal(a): > >> if(currNode -> word == a_word) > > > > You cannot compare strings with ==, you'll have to use strcmp() function like it is already used inside the assign_list() function. > > > > ------------------------------------------------------------------------------ > Fulfilling the Lean Software Promise > Lean software platforms are now widely adopted and the benefits have been > demonstrated beyond question. Learn why your peers are replacing JEE > containers with lightweight application servers - and what you can gain > from the move. http://p.sf.net/sfu/vmware-sfemails > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Reid T. <rei...@at...> - 2011-04-25 03:26:50
|
On 4/24/2011 2:23 PM, Jordan Burnam wrote: > if(currNode -> word == a_word) you can't compare strings this way man or google strcmp and friends |
From: jordanburnam1990 <jor...@me...> - 2011-04-25 00:10:44
|
Now I get an infinite loop when using the compare string functions for the if statement in add_after any ideas? Sent from my iPhone On Apr 24, 2011, at 4:51 PM, Michal Molhanec <mol...@se...> wrote: > Dne 24.4.2011 20:23, Jordan Burnam napsal(a): >> if(currNode -> word == a_word) > > You cannot compare strings with ==, you'll have to use strcmp() function like it is already used inside the assign_list() function. > |
From: Michal M. <mol...@se...> - 2011-04-24 20:51:32
|
Dne 24.4.2011 20:23, Jordan Burnam napsal(a): > if(currNode -> word == a_word) You cannot compare strings with ==, you'll have to use strcmp() function like it is already used inside the assign_list() function. |
From: Jordan B. <jor...@me...> - 2011-04-24 18:23:46
|
My teacher has given us the following code, within this code I have added the function "void add_after" and am trying to get it to work I do not get an error with this program. It will run but it will not add the word after. I think once you review the code it should be self explanatory: <code> #include <iostream> #include <cstdlib> #include <cstring> using namespace std; const int MAX_WORD_LENGTH = 80; /* definition of a node */ struct Node; typedef Node *Node_ptr; struct Node { char word[MAX_WORD_LENGTH]; Node_ptr ptr_to_next_node; }; /* Function to assign a linked list to "a_node" */ void assign_list(Node_ptr &a_list); /* Function to assign a new dynamic node variable to "a_node" */ void assign_new_node(Node_ptr &a_node); /* Function to print the strings in the list "a_node" */ void print_list(Node_ptr a_node); void add_after(Node_ptr &list, char a_word[], char word_after[]); //This function inserts a node containing "word_after" in the linked list "list", after the first occurrence of a node containing "a_word". If "list" does not contain such a node, the function leaves it unchanged. //***************************************************** void main() { char word_a[MAX_WORD_LENGTH]; char aword[MAX_WORD_LENGTH]; Node_ptr my_list = NULL; assign_list(my_list); cout << "\nTHE LIST IS NOW:\n"; print_list(my_list); cout << "After which word would you like to add a word?:"; cin >> word_a; cout << "What word would you like to add after that word?:"; cin >> aword; add_after(my_list,aword, word_a); cout << "The list is now:"<< endl; print_list(my_list); } //***************************************************** /* DEFINITION OF FUNCTION "assign_list" */ void assign_list(Node_ptr &a_list) { Node_ptr current_node, last_node; assign_new_node(a_list); cout << "Enter first word (or '.' to end list): "; cin >> a_list->word; if (!strcmp(".",a_list->word)) { delete a_list; a_list = NULL; } current_node = a_list; while (current_node != NULL) { assign_new_node(last_node); cout << "Enter next word (or '.' to end list): "; cin >> last_node->word; if (!strcmp(".",last_node->word)) { delete last_node; last_node = NULL; } current_node->ptr_to_next_node = last_node; current_node = last_node; } } /* END OF FUNCTION DEFINITION */ /* DEFINITION OF FUNCTION "assign_new_node" */ void assign_new_node(Node_ptr &a_node) { a_node = new Node; if (a_node == NULL) { cout << "sorry - no more memory\n"; exit(1); } } //***************************************************** /* DEFINITION OF FUNCTION "print_list" */ void print_list(Node_ptr a_node) { while (a_node != NULL) { cout << a_node->word << " "; a_node = a_node->ptr_to_next_node; } } //***************************************************** void add_after(Node_ptr &list, char a_word[], char word_after[]) { Node_ptr currNode; Node_ptr newNode; Node_ptr nextNode; currNode = list; while(currNode != NULL) { if(currNode -> word == a_word) { assign_new_node(newNode); nextNode = currNode ->ptr_to_next_node; currNode ->ptr_to_next_node = newNode; newNode ->ptr_to_next_node = nextNode; strncpy(newNode->word, a_word, MAX_WORD_LENGTH); } else currNode = currNode -> ptr_to_next_node; } } </code> |
From: William Mc C. <wil...@ms...> - 2011-04-21 07:51:34
|
http://aliancadaterra.org.br/shop.html |
From: John B. <joh...@gm...> - 2011-04-21 03:27:59
|
How can I install Dev C++ 4.9.9.2 on Windows 7 and Vista? -- *Brights* |
From: William Mc C. <wil...@ms...> - 2011-04-15 19:55:31
|
http://chludil.cz/kupikupi.html |
From: João M. R. S. T. <ta...@fe...> - 2011-04-05 18:39:34
|
---------------------------------------------------------------------------- ------------------------------------------------------- International ECCOMAS Thematic Conference VipIMAGE 2011 - III ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING 12-14th October 2011, Olhão, Algarve, Portugal www.fe.up.pt/~vipimage SUBMISSION DEADLINE EXTENDED to April 20th We would appreciate if you could distribute this information by your colleagues and co-workers. ---------------------------------------------------------------------------- ------------------------------------------------------- Dear Colleague, We are pleased to announce an extension of the deadline for abstract submission to the International Conference VipIMAGE 2011 - III ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING (www.fe.up.pt/~vipimage), to April 20th. Possible Topics (not limited to) - Signal and Image Processing - Computational Vision - Medical Imaging - Physics of Medical Imaging - Tracking and Analysis of Movement - Simulation and Modeling - Image Acquisition - Shape Reconstruction - Objects Segmentation, Matching, Simulation - Data Interpolation, Registration, Acquisition and Compression - 3D Vision - Virtual Reality - Software Development for Image Processing and Analysis - Computer Aided Diagnosis, Surgery, Therapy, and Treatment - Computational Bioimaging and Visualization - Telemedicine Systems and their Applications Invited Lecturers - Armando J. Pinho - University of Aveiro, Portugal - Irene M. Gamba - The University of Texas at Austin, USA - Marc Pollefeys - ETH Zurich, Switzerland - Marc Thiriet - Universite Pierre et Marie Curie (Paris VI), France - Xavier Roca Marvà - Autonomous University of Barcelona, Spain - Stan Sclaroff - Boston University, USA Thematic Sessions Proposals to organize Thematic Session within VipIMAGE 2011 are welcome and should be submitted by email to the conference co-chairs (ta...@fe..., rn...@fe...) Thematic Sessions Confirmed - Simultaneous MR-PET imaging - Satellite image analysis for environmental risk assessment - Dental Imaging and Processing Techniques - Digital Mammography - Imaging of Biological Flows: trends and challenges - Imaging techniques applied to soft tissue Biomechanics Publications The proceedings book will be published by the Taylor & Francis Group and indexed by Thomson Reuters Conference Proceedings Citation Index, IET Inspect and Elsevier Scopus. A book with 20 invited works from the best ones presented in VipIMAGE2011 (extended versions) will be published by Springer. A special issue of The International Journal for Numerical Methods in Biomedical Engineering dedicated to VipIMAGE 2011, published by John Wiley & Sons, is in preparation (to be confirmed). Important dates - Deadline for Extended Abstracts: 20th April 2011 (postponed) - Authors Notification: 15th May 2011 (postponed) - Deadline for Full Papers: 15th June 2011 Awards "best paper award" and "best student paper award" are going to be given to the author(s) of two papers presented at the conference, selected by the Organizing Committee based on the best combined marks from the Scientific Committee and Session Chairs. We are looking forward to see you in Algarve next October. Kind regards, João Manuel R. S. Tavares Renato Natal Jorge (conference co-chairs) PS. For further details please see the conference website at: www.fe.up.pt/~vipimage |
From: Kathleen E. <k.a...@at...> - 2011-04-03 06:53:52
|
http://essana.fr/go.friend.php |
From: William Mc C. <wil...@ms...> - 2011-04-03 00:18:19
|
http://royalprimebakers.com/medsrxhealth.html |
From: Kathleen E. <k.a...@at...> - 2011-04-02 08:22:42
|
http://modacicek.com.tr/go.friend.php |