>>what does it mean " if variable is not '/n'?
If the '\n' character has not been encountered -- normally signifies the end of a string in text files. '\0' indicates the end of the string in memory, assuming it is a normal c-style character array.
>>and is there any other way of writing
Could be done like this:
char str[] = "01\n";
if( strchr(str,variable) != 0)
{
// found it
}
Last edited by Ancient Dragon; Sep 30th, 2007 at 9:17 pm.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.