C编译器??)替换

C compiler ??) replacement

本文关键字:替换 编译器      更新时间:2023-10-16

我们在Visual Studio 2005编译器中遇到了一个奇怪的问题。
在编译时,它替换了这个字符串常量

"... ,0x??)"

和这个:

"... ,0x]"

通过尝试,我们几乎不知道执行了以下替换:

??(   ->   [
??)   ->   ]
??<   ->   {
??>   ->   }

所以我想这应该是一个特性,而不是一个bug。
Visual Studio 2010不支持这个功能。

可惜你不能用谷歌搜索??(
问题是:

我们可以通过编译器开关来控制这个行为吗?

顺便说一句:这是什么原因?

这些是C有向图和三向图:http://en.wikipedia.org/wiki/Digraphs_and_trigraphs

是的,你可以在visual studio中禁用它们:http://msdn.microsoft.com/en-us/library/ee462497.aspx