Why does the C preprocessor consider enum values as equal?

后端 未结 7 1304
南方客
南方客 2020-12-08 12:48

Why does the std::cout line in the following code run even though A and B are different?

#include 

en         


        
7条回答
  •  Happy的楠姐
    2020-12-08 13:25

    The preprocessor runs before the compiler, which means that the preprocessor doesn't know anything about symbols defined by the compiler and therefore it can't act depending on them.

提交回复
热议问题