读书人

求教?解决方法

发布时间: 2012-04-04 16:38:51 作者: rapoo

求教??

C/C++ code
#define  FILE_NAME     "myfile"char path[100];char dir[]="/root/";printf("%s"  FILE_NAME, dir); //怎么理解  :/root/myfile
h

[解决办法]
ISO/IEC 9899:1999 (E) ©ISO/IEC
6.4.5 String literals
Semantics
4 In translation phase 6, the multibyte character sequences specified by any sequence of
adjacent character and wide string literal tokens are concatenated into a single multibyte
character sequence. If any of the tokens are wide string literal tokens, the resulting
multibyte character sequence is treated as a wide string literal; otherwise, it is treated as a
character string literal.

读书人网 >C语言

热点推荐