![](https://csdnimg.cn/release/download_crawler_static/86924094/bg4.jpg)
实践
1
小结
• P.9
表
1.3
转义字符提供了一种字符的表述方式,必须
得在字符的有效范围取值。
(777)
8
=(511)
10
cout<<"\777";
//error C2022: ‘511' : too big for character
•
理解字符与字符串
char ch='AB';
//
在编译器眼中右值为
0x4142
,截位后的
0x42
对
ch
进行初始化
cout<< ch <<endl; //B
cout<< 'AB' <<endl; //16706
cout<< hex << 'AB' <<endl; //4142
cout << dec
<<
'
烫
' <<endl; //52428
cout << hex << '
烫
' <<endl; //cccc