in my C++ program, I have the following line:
text += (char)value;
The value
is an ASCII value and whenever this value is greater than 127, the corresponding character (added to the text
) has a negative value. Why ? And how can I prevent that ?
Note: text
is just a string
I have found this on StackOverflow. A related thread but no solutions were provided there.