开发者

Strings between quotation marks in C++ [duplicate]

开发者 https://www.devze.com 2023-04-09 04:19 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: What do single quotes do in C++ when used on multiple characters?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

What do single quotes do in C++ when used on multiple characters?

The following code compiles in C++:

unsigned int x;
x = 'abc';

What does it mean? Is putting string between quotation marks legal开发者_开发问答? What does it do?


Is not a string, but a multi character literal. See What do single quotes do in C++ when used on multiple characters?. (Vote to close as duplicated)

0

精彩评论

暂无评论...
验证码 换一张
取 消