djgpp functions returning boolean?
Posted: Sun May 04, 2003 11:00 pm
hi, i am writing a function compareStrings(char *str1, char *str2) in c with djgpp and i am wondering if i can have it return a boolean, or does it have to return an unsigned char or something? i would like to be able to do the following:
if (compareStrings("pssWRD", inputPwd))
if compareStrings() returns an unsigned char, then if the return value is 0 will the if statement evaluate to false and if the return value is any nonzero value will that if statement evaluate to true?
thanks
if (compareStrings("pssWRD", inputPwd))
if compareStrings() returns an unsigned char, then if the return value is 0 will the if statement evaluate to false and if the return value is any nonzero value will that if statement evaluate to true?
thanks