Sorry for asking this :/
Purpose : Invert every single letter to uppercase or downcase depending what is it's state.
Problem : Invert characters will convert all non capital letters to '?'
Notice : i am pretty sure that the function receives the characters as it supposed to.
Code:
#include <ctype.h>
#include <stdio.h>
char invert(char c)
{
if(isalpha(c)==0)/*not a letter*/
return c;
if('c'<=132)/*then it is uppercase.remember we know it is a letter*/
c+=32;
else
c-=32;
printf("edw %c\n",c);
return c;
}
After-question : is alpha safe to use? Because this isalpha - C++ Reference made me a little bit worried(the section that says about locales)
Thank you in advance and sorry for the question