字符序列Character Sequences

ANSI 3.8.2 源文件字符序列的映射ANSI 3.8.2 The mapping of source file character sequences

预处理器语句使用的字符集和源文件语句相同,只不过转义序列不受支持。Preprocessor statements use the same character set as source file statements with the exception that escape sequences are not supported.

因此,若要指定包含文件的路径,请仅使用一个反斜杠:Thus, to specify a path for an include file, use only one backslash:

#include "path1\path2\myfile"  

在源代码中,需要两个反斜杠:Within source code, two backslashes are necessary:

fil = fopen( "path1\\path2\\myfile", "rt" );  

请参阅See Also

预处理指令Preprocessing Directives