NUL undeclared- first use in this function

后端 未结 4 1627
太阳男子
太阳男子 2020-12-21 15:53

From the web I understand that C contains NUL keyword.

But while compiling I get an error

NUL undeclared first use in this function\'
         


        
4条回答
  •  隐瞒了意图╮
    2020-12-21 16:24

    No, that's not standard. Add this at the beginning of your code or just use 0:

    #define NUL 0
    

    I infered you're not looking for NULL since you're doing ch == NUL

    In various texts it is quite frequent to refer to '\0' as NUL.

提交回复
热议问题