求教?解决方法
求教??C/C++ code#defineFILE_NAMEmyfilechar path[100]char dir[]/root/printf(%sFILE_NAME, di
求教??
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.