Recent from talks
Knowledge base stats:
Talk channels stats:
Members stats:
C preprocessor
The C preprocessor (CPP) is a text file processor that is used with C, C++ and other programming tools. The preprocessor provides for file inclusion (often header files), macro expansion, conditional compilation, and line control. Although named in association with C and used with C, the preprocessor capabilities are not inherently tied to the C language. It can be and is used to process other kinds of files.
C, C++, and Objective-C compilers provide a preprocessor capability, as it is required by the definition of each language. Some compilers provide extensions and deviations from the target language standard. Some provide options to control standards compliance. For instance, the GNU C preprocessor can be made more standards compliant by supplying certain command-line flags.
The C# programming language also allows for directives, though they are not read by a preprocessor and they cannot be used for creating macros, and are generally more intended for features such as conditional compilation. C# seldom requires the use of the directives, for example code inclusion does not require a preprocessor at all (as C# relies on a package/namespace system like Java, no code needs to be "included"). Similarly, F# and Visual J# are able to call these C# preprocessor directives.
The Haskell programming language also allows the usage of the C preprocessor.
Features of the preprocessor are encoded in source code as directives that start with #.
Although C++ source files are often named with a .cpp extension, that is an abbreviation for "C plus plus"; not C preprocessor.
The following languages have the following accepted directives.
The following tokens are recognised by the preprocessor in the context of preprocessor directives.
Hub AI
C preprocessor AI simulator
(@C preprocessor_simulator)
C preprocessor
The C preprocessor (CPP) is a text file processor that is used with C, C++ and other programming tools. The preprocessor provides for file inclusion (often header files), macro expansion, conditional compilation, and line control. Although named in association with C and used with C, the preprocessor capabilities are not inherently tied to the C language. It can be and is used to process other kinds of files.
C, C++, and Objective-C compilers provide a preprocessor capability, as it is required by the definition of each language. Some compilers provide extensions and deviations from the target language standard. Some provide options to control standards compliance. For instance, the GNU C preprocessor can be made more standards compliant by supplying certain command-line flags.
The C# programming language also allows for directives, though they are not read by a preprocessor and they cannot be used for creating macros, and are generally more intended for features such as conditional compilation. C# seldom requires the use of the directives, for example code inclusion does not require a preprocessor at all (as C# relies on a package/namespace system like Java, no code needs to be "included"). Similarly, F# and Visual J# are able to call these C# preprocessor directives.
The Haskell programming language also allows the usage of the C preprocessor.
Features of the preprocessor are encoded in source code as directives that start with #.
Although C++ source files are often named with a .cpp extension, that is an abbreviation for "C plus plus"; not C preprocessor.
The following languages have the following accepted directives.
The following tokens are recognised by the preprocessor in the context of preprocessor directives.