Domanda

We faced a strange issue with the Visual Studio 2005 compiler.
At compile time, it replaces this string constant

"... ,0x??)"

with this one:

"... ,0x]"

We hardly learned by trying that the following replacements are performed:

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

So I guess this should be a feature, not a bug.
The Visual Studio 2010 doesn't do that.

Too bad you can't search with Google for ??(.
So the question is:

Can we control this behavior by a compiler switch?

BTW: What is the reason for this?

È stato utile?

Soluzione

Those are C digraphs and trigraphs: http://en.wikipedia.org/wiki/Digraphs_and_trigraphs

And yes, you can disable them in visual studio: http://msdn.microsoft.com/en-us/library/ee462497.aspx

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top