I am aware that C++ has 3 types of char variables.
char // with range : -127 to 127 or 0 to 255 ??
signed char // with range : 0 to 255
unsigned char // with range : -127 to 127
Correct? So which one is it actually for char?
My problem is that I want to use istream::read function which requires a * char parameter. However, I know the values my program will be reading will be in range 0 to 255.
How do I know that if I do this file.read((char *)buffer, size);
, I will be guaranteed that every single thing being read will not be set to a value with a range of -127 to 127 ?
edit: I understand that my char can be both ranges depending on my platform/ implementation. Correct? If yes, how can I know which platform/ implementation I am using ? Does it depend on my IDE- compiler ? OS?