title | description | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | |||||
---|---|---|---|---|---|---|---|---|---|---|
/Zc:trigraphs (Trigraphs Substitution) |
A Microsoft C++ compiler option that controls conformance support for trigraphs. |
07/25/2020 |
|
|
e3d6058f-400d-4966-a3aa-800cfdf69cbf |
When /Zc:trigraphs
is specified, the compiler replaces a trigraph character sequence by using a corresponding punctuation character.
/Zc:trigraphs
[-
]
A trigraph consists of two consecutive question marks (??
) followed by a unique third character. The C language standard supports trigraphs for source files that use a character set that doesn't contain convenient graphic representations for some punctuation characters. For example, when trigraphs are enabled, the compiler replaces the ??=
trigraph by using the #
character. Through C++14, trigraphs are supported as in C. The C++17 standard removes trigraphs from the C++ language. In C++ code, the /Zc:trigraphs
compiler option enables substitution of trigraph sequences by the corresponding punctuation character. /Zc:trigraphs-
disables trigraph substitution.
The /Zc:trigraphs
option is off by default, and the option isn't affected when the /permissive-
option is specified.
For a list of C/C++ trigraphs, and an example that shows how to use trigraphs, see Trigraphs.
-
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
-
Select the Configuration Properties > C/C++ > Command Line property page.
-
Modify the Additional Options property to include
/Zc:trigraphs
or/Zc:trigraphs-
and then choose OK.