/
C Preprocessor
C Preprocessor
When programming with C and C++ it helps to understand a little about what the C Preprocessor is and when the compiler invokes it.
Basically as the name implied the C preprocessor is done before the C++ compiler actually parses the file and compiles the code.
The C preprocessor handles all the commands you see like:
#!cpp
#include
#define
#ifdef
#else
#endif
etc.
So directives like #include are used to suck in the included file and expand it into the context shown the code. The pre-processor runs recursively in any included files which as you can imagine if you #include files which #include many other files and so forth the actual expanded file that is finally passed to the C++ compiler after the pre-processor becomes very large.
See wikipedia for more information.
, multiple selections available,
Related content
How do you see how the pre-processor processes code?
How do you see how the pre-processor processes code?
More like this
Why do we need header files?
Why do we need header files?
More like this
How can we make our code compile fast?
How can we make our code compile fast?
Read with this
Predeclarations instead of #include
Predeclarations instead of #include
More like this
What problem is created if a header file is included twice?
What problem is created if a header file is included twice?
More like this
__FILE__ and __LINE__
__FILE__ and __LINE__
More like this