Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
title description ms.date helpviewer_keywords ms.assetid
C/C++ preprocessor reference
Reference for the Microsoft C/C++ compiler preprocessor in Visual Studio.
preprocessor, reference overview

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 Visual Studio 2019 the /Zc:preprocessor compiler option provides a fully conformant C11 and C17 preprocessor. This is the default when you use the compiler flag /std:c11 or /std:c17.

In this section

Provides an overview of the traditional and new conforming preprocessors.

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 the C and C++ standards and by Microsoft C++.

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.

Related sections

C++ language reference
Provides reference material for the Microsoft implementation of the C++ language.

C language reference
Provides reference material for the Microsoft implementation of the C language.

C/C++ build reference
Provides links to topics discussing compiler and linker options.

Visual Studio projects - C++
Describes the user interface in Visual Studio that enables you to specify the directories that the project system will search to locate files for your C++ project.