摘要:
在C语言中:char a = 'a';sizeof(char) = 1;sizeof(a) = 1;sizeof('a') = 4;在C++语言中:char a = 'a';sizeof(char) = 1;sizeof(a) = 1;sizeof('a') = 1;这是ISO C和ISO C++的一个区别:In C, character literals(字符常量) such as 'a' have type int, and thus sizeof('a') isequal to sizeof( 阅读全文