Re: [Dev-C++] C++ Linked Lists and Add After
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
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 > |