if(String1 == "Quit")
{
break;
}
String Comparison
I''m trying to see if a character array contains certain phrase or word, how do I check a character array for this ie...
use strcmp().
it returns zero if the strings are the same, so some people like to do a little #define to make the syntax nicer....
#define StringMatch(a,b) (strcmp(a,b) == 0)
it returns zero if the strings are the same, so some people like to do a little #define to make the syntax nicer....
#define StringMatch(a,b) (strcmp(a,b) == 0)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement