| C Tutorial | #define | |||
|
main() Multiple Files Prototypes Preprocessor #define a href="hash_include.htm">#include #include foo.h vs foo.c #if Multiple #includes -- #pragma once Assert
|
The #define directive can be used to set up symbolic replacements in the source. As with all preprocessor operations, #define is extremely unintelligent -- it just does textual replacement without understanding. #define statements are used as a crude way of establishing symbolic constants.
#define MAX 100 #define SEVEN_WORDS that_symbol_expands_to_all_these_words
Later code can use the symbols MAX or SEVEN_WORDS which will be replaced by the text to the right of each symbol in its #define. Want To Know more with Video ??? Contact for more learning: webmaster@freehost7com |
|