#include <iostream>
using namespace std;
int main()
{
cout << (int)'\1' << endl;
cout << 1 << endl;
cout << (int)'\11' << endl;
cout << 11 << endl;
return 0;
}
请问,(int)'11'这样输出为什么是9啊?
ringa_lee2017-04-17 13:47:01
Escape sequence
There are five types of escape sequences: Simple, Octal, Hexadecimal, Unicode (UTF-8) and Unicode (UTF-16). The escape sequence can be any of the following:
See Strings and Character Literals (C++)