Can this macro be converted to a function?

后端 未结 16 1209
后悔当初
后悔当初 2020-12-05 16:27

While refactoring code and ridding myself of all those #defines that we\'re now taught to hate, I came across this beauty used to calculate the number of elements in a struc

16条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 16:58

    Answered in detail here: Array Size determination Part 1 and here: Array Size determination Part 2.

提交回复
热议问题