Replace CharLower(); & CharUpper(); to toupper(); & tolower();