作者在 2008-06-08 11:39:55 发布以下内容
今天调试程序的时候
发现有个警告warning C4129: 'S' : unrecognized character escape sequence
查了MSDN
发现有个警告warning C4129: 'S' : unrecognized character escape sequence
查了MSDN
'character' : unrecognized character escape sequence
The character following a backslash (\) in a character or string constant was not recognized as a valid escape sequence.
As a result, the backslash is ignored and not printed, and the character following the backslash is printed.
To print a single backslash, specify a double backslash (\\).
但是在VC的出错行却怎么也没有看到字符 'S',怎么回事呢?、难道是VC错了!不可能
经过好长时间最后才发现这个是由于提示输出的是一个长字符串的输出,VC错误指示指向的是资格字符串的最后一行,而不是刚好是字符串 'S'出现的那一行。因此这类警告指定的位置表示所在的字符串有问题,而不是特指字符串所在行的那一部分有问题