std::cin.ignore('>1','\n'); |
|
| How wrong is this? |
|
|
chars aren't ints, they are integer values. Usually 8 bit (-127-128). Since a char is guaranteed by the standard to be of smaller or equal size than an int, you can always safely cast a char to an int without dataloss. The other way round data loss may occur if the int is larger than what fits into a char (obviously).