|
amateur: comparing strings |
Pavel Hilser
Member #5,788
April 2005
|
Sorry for this question. I was googling a lot, but have not found anything relevant . _____________________________________ |
miran
Member #2,407
June 2002
|
Pavel Hilser
Member #5,788
April 2005
|
ok, stupid me, thanx for kicking in the right direction _____________________________________ |
Goalie Ca
Member #2,579
July 2002
|
string.h has em all... http://www.opengroup.org/onlinepubs/007908799/xsh/string.h.html ------------- |
James Stanley
Member #7,275
May 2006
|
Forgive me, but what's wrong with '=='? |
Paul whoknows
Member #5,081
September 2004
|
Quote: Forgive me, but what's wrong with '=='? You can't compare two strings using the "==" operator in C.Because in C a strings is an array of chars, so you have to compara each char in the array one by one.You can implement your own function to do that using a pointer to char, or you can use the ANSI C strcmp and stricmp functions. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
|