开发者

How to address this instance of C4428 Visual C++ warning about a character literal?

Currently Visual C++ issues C4428 warning

universal-character-name encountered in source

on the following code

const wchar_t someMagicValue = L'\ufffd';

I'd like to address this warning and I wonder whether the following:

const wchar_t someMa开发者_运维技巧gicValue = L'\xfffd';

will be fully equivalent code.

Will the latter code be fully equivalent to the former? What could be a better option?


As commented here

Compiler Warning (level 4) C4428 (VS2010)

this is most likely /just a bug/ in MSVC

See also this thread for a bit more discussion


Have you tried this?

const wchar_t someMagicValue = 0xfffd;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜