How does one represent the empty char?

前端 未结 9 1351
闹比i
闹比i 2020-12-22 18:06

I\'m currently writing a little program but I keep getting this error when compiling

error: empty character constant

I realize i

9条回答
  •  佛祖请我去吃肉
    2020-12-22 18:17

    There is no such thing as the "empty character" ''.

    If you need a space character, that can be represented as a space: c[i] = ' ' or as its ASCII octal equivalent: c[i] = '\040'. If you need a NUL character that's c[i] = '\0'.

提交回复
热议问题