Alex Rivera | Logout

Difference between macro and preprocessor

Asked 2012-08-14T18:07:11.920
18

From what I understand , #define blah 8 is a macro, while # is the pre-processor directive.

Can we say that #include, #if, #ifdef, etc. are also macros, or are they called something else? Or is it that macro is just a term used for #define statements only?

Edit
Report

1 Answer

4

Preporcessor: the program that does the preprocessing (file inclusion, macro expansion, conditional compilation).

Macro: a word defined by the #define preprocessor directive that evaluates to some other expression.

Preprocessor directive: a special #-keyword, recognized by the preprocessor.

answered 2012-08-14T18:12:58.407

Your Answer