K so atm, I'm having problems understanding ENDIF and IFDEF preprocessor stuff.. I want to Use a specific method if a file is included.. If not, use a different method..
Since toupper is defined in CCType I tried to check if that file was included.. if it was, use toupper else use the hex values.. I'm not sure which method is optimum or faster or whatever so I decided to do it this way. By include.
Any help is appreciated. +1 as I cannot find it on the net anywhere.. Just a bunch of tuts on #Defines instead of includes.
Also how do I check "IF NOT #Included or #Define"??
string ToUpper(string Str)
{
#ifdef CCTYPE
for (unsigned short I = 0; I < Str.length(); I++)
{
Str[I] = toupper(Str[I]);
}
#else
for (unsigned short I = 0; I < Str.size(); I++)
if(Str[I] >= 0x61 && Str[I] <= 0x7A)
Str[I] = Str[I] - 0x20;
#endif
return Str;
}