Type of #define variables

后端 未结 7 2187
一个人的身影
一个人的身影 2020-11-27 17:33

If I have:

#define MAXLINE    5000

What type is MAXLINE understood to be? Should I assume it is an int? Can I test it somehow?

7条回答
  •  -上瘾入骨i
    2020-11-27 18:26

    the compiler never sees that line of code, a preprocessor runs before the actual compilation and replace those macros with their literal values, see link below for more information

    http://www.cplusplus.com/doc/tutorial/preprocessor/

提交回复
热议问题