|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
/C (Preserve Comments During Preprocessing)
Preserves comments during preprocessing.
This compiler option requires the /E, /P, or /EP option.
The following code sample will display the source code comment.
// C_compiler_option.cpp // compile with: /E /C /c int i; // a variable
This sample will produce the following output.
#line 1 "C_compiler_option.cpp" int i; // a variable
To set this compiler option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.
Click the C/C++ folder.
Click the Preprocessor property page.
Modify the Keep Comments property.
To set this compiler option programmatically