Compartilhar via


C/C++ Preprocessor Reference

The C/C++ Preprocessor Reference explains the preprocessor as it is implemented in Microsoft C/C++. The preprocessor performs preliminary operations on C and C++ files before they are passed to the compiler. You can use the preprocessor to conditionally compile code, insert files, specify compile-time error messages, and apply machine-specific rules to sections of code.

In This Section

  • Preprocessor Directives
    Describes directives, typically used to make source programs easy to change and easy to compile in different execution environments.

  • Preprocessor Operators
    Discusses the four preprocessor-specific operators used in the context of the #define directive.

  • Predefined Macros
    Discusses predefined macros as specified by ANSI and Microsoft C++.

  • Pragmas
    Discusses pragmas, which offer a way for each compiler to offer machine- and operating system-specific features while retaining overall compatibility with the C and C++ languages.