It's programming time!/C++/preprocessor directives

From Create Your Own Story

< It's programming time! | C++
Revision as of 06:50, 30 June 2016 by DirtyMeStoryTime (Talk | contribs)
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)

Here is the exciting list of preprocessor directives!

It does excite you, right? Yeah, me neither...but, well, they are used alot, so good for referencing.

Name Action
# Null directive specifying that no action be performed.
#define Defines
#elif Conditionally includes source text if the previous #if, #ifdef, #ifndef, or #elif test fails.
#else Conditionally includes source text if the previous #if, #ifdef, #ifndef, or #elif test fails.
#endif Ends conditional text.
#error Defines text for a compile-time error message.
#if Conditionally includes or suppresses portions of source code, depending on the result of a constant expression.
#ifdef Conditionally includes source text if a macro name is defined.
#ifndef Conditionally includes source text if a macro name is not defined.
#include Inserts text from another source file.
#line Supplies a line number for compiler messages.
#pragma Specifies implementation-defined instructions to the compiler.
#undef Removes a preprocessor macro definition.
Personal tools