Hi every body!
I was reading about " char" data type. Here is what my book says:
"If the character is of a signed category, you can declare it as a signed character. This type of variable would be an 8-bit integer whose value can range from –128 to +127. "
But when i use the "signed char" in my program and test it by inputting " -1", the program only takes " first character which is "-" and ignores the " 1". It appears to me, only first character is accepted. There is no way i can enter "-1" as input 1.e
signed char t;
cin >> t
Though the book says the value for "t" can range from -128 to 127 , but when i input "-1" , only " -" is placed in varaiable "t".
Thanks a lot!