Just quickly looking (I didn't test-compile), it looks like doing this should make it compile:
Code:
bool IsOddDigit (char ch)
{
//Do stuff here, and return true if ODD, return false if EVEN
return 0; // Function needs to return a bool
}
Then you need to figure out the "stuff"
Code:
if(something)
return TRUE;
else
return FALSE;
And in main, something like this:
Code:
temp = IsOddDigit (ch); // if true, output ODD, else output EVEN
if(temp) // If temp is anything other than zero
cout << "ODD";
else
cout << "EVEN";
return 0;
NOTES:
if(temp) is the same as if(temp != 0)
It might seem confusing ritht now, but you can leave out the temp variable and just put if(IsOddDigit(ch) ) That will stick the value returned by IsOddDigit() into the if statement... See?