error with define macro definition

后端 未结 3 1753
执念已碎
执念已碎 2020-12-21 14:40

when i am using #define function,I observe something bizarre. In the below code if I gave i value as \'10\' from input i

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-21 15:42

    What you have is undefined behaviour.

    You Double(++i) is changed to ++i * ++i, when you compile you code.

提交回复
热议问题