取消宏定义

今天遇到一个问题是:重复宏定义。想到的解决方法是使用undef取消该重复宏。

解决方法

#ifdef xxx
    #undef xxx
#endif

或

#ifndef xxx
    #define xxx
#endif

评论

暂无评论