Difference between macro and preprocessor

后端 未结 4 1131
时光说笑
时光说笑 2020-12-15 07:15

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

Can we say #include,#if,#ifdef,etc. are al

4条回答
  •  [愿得一人]
    2020-12-15 07:27

    #include, #if, etc. are features of the preprocessor.

    #define blah 8
    

    Is a preprocessor directive and declares a new macro named blah.

    • Macros are the result of a #define statement.
    • The preprocessor is a feature of C.

提交回复
热议问题