What does preprocessing exactly mean in compiler

后端 未结 6 2093
没有蜡笔的小新
没有蜡笔的小新 2021-02-09 05:52

I am trying to understand the difference between a typedef and define. There are a lot of good posts specially at this previous question on SO, however I can\'t understand the p

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-09 06:09

    A preprocessor is an "engine" executed before the compiler compiles code. #define #include are preprocessor directives or macros, so the preprocessor engine executes code related to the directives. When the preprocessor is done the compiler sees nothing of the directives/macros. However constructs such as typedef, if, while etc.. are understood by the compiler.

提交回复
热议问题