Can a C macro definition refer to other macros?

前端 未结 6 1196
既然无缘
既然无缘 2020-12-29 01:01

What I\'m trying to figure out is if something such as this (written in C):

#define FOO 15
#define BAR 23
#define MEH (FOO / BAR)

6条回答
  •  心在旅途
    2020-12-29 01:46

    Short answer yes. You can nest defines and macros like that - as many levels as you want as long as it isn't recursive.

提交回复
热议问题