Comparing

This is a discussion on Comparing within the C++ Programming forums, part of the General Programming Boards category; Hi,
Im trying to compare a char entered in a text box with another char.
At the moment it works ...

The utDtiLine[viLine].sANI char (the char which i want to compare the data in the text box to) is changed extremely often, every second say. It only stores one whole number at a time eg, 01212222567 (or 11 chars!)
and there is know way of knowing what this number is going to be!

If this line "if (strcmp(utDtiLine[viLine].sANI, cCli) == 0)" compares your two strings for equality, this line "if (strstr(utDtiLine[viLine].sANI, cCli) != NULL) will compare if the first string is part of the second. Look up the strstr function in your helpfile to get more info.