![]() |
|
#1
|
|||
|
|||
Can't compare the contents of arraysi realy need help with this code
i made it but i can't compare the contents of the arrays i need to compare it to know if the entered word is the same as the given word CPP / C++ / C Code:
please help P.S i'm using Turbo C ++ Last edited by LuciWiz : 02-Feb-2009 at 09:38.
Reason: Please insert your C++ code between [cpp] & [/cpp] tags
|
|||
|
#2
|
|||
|
|||
Re: Can't compare the contents of arraysYou are doing several things wrong here. For one, when using scanf() to read in a string, you pass the array of characters to scanf(), not the address of the array.
To answer your question, you can compare two strings with strcmp(). |
|
#3
|
|||
|
|||
Re: Can't compare the contents of arraysThnx ok i modified it and used the strcmp() function but i'm still facing some problems
CPP / C++ / C Code:
Last edited by LuciWiz : 02-Feb-2009 at 15:08.
Reason: Please insert your C++ code between [cpp] & [/cpp] tags
|
|
#4
|
|||
|
|||
Re: Can't compare the contents of arraysQuote:
|
|
#5
|
|||
|
|||
Re: Can't compare the contents of arraysit still isn't comparing the two arrays and there is a logical mistake that i can't find
|
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trouble integrating console code into GUI | Barman007 | Java Forum | 18 | 15-May-2008 14:05 |
| How to sort random access file? | wmmccoy0910 | C Programming Language | 12 | 04-Sep-2006 04:40 |
| Here it is again! 35% - 40% off For Life! | my-e-space | Web Hosting Advertisements & Offers | 0 | 20-Apr-2006 15:48 |
| Guidelines for posting requests for help - UPDATED! | WaltP | C Programming Language | 0 | 21-Apr-2005 03:44 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The