Originally posted by Spectrum48k
this section of code does not compile:
if(tolower(*p1) != (tolower(*p2)) break;
the error is "missing ')' before 'break'
Why did you seperate the second condition? To make your code look good you should do with the same convention; so either write:
Code:
if( tolower(*p1) != tolower(*p2) ) break;
or
Code:
if( (tolower(*p1) ) != (tolower(*p2) ) ) break;
I find the second useful when doing something like this
Code:
if( (p1==x && p2==y) || (p3!=y) )
where you want to seperate the conditions just for clarity.
axon