Macro to turn off printf statements

后端 未结 10 1619
粉色の甜心
粉色の甜心 2020-12-14 08:42

What MACRO can be used to switch off printf statements, rather than removing them all for deployment builds, I just want to switch them off, skip them, ignore them.

10条回答
  •  感动是毒
    2020-12-14 09:08

    Below simple function serves the purpose, I use the same.

    int printf(const char *fmt, ...)
    {
    return (0)
    }
    

提交回复
热议问题