How does one represent the empty char?

前端 未结 9 1326
闹比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:22

    You can't store "no character" in a character - it doesn't make sense.

    As an alternative you could store a character that has a special meaning to you - e.g. null char '\0' - and treat this specially.

提交回复
热议问题