How does one represent the empty char?

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

    You can use c[i]= '\0' or simply c[i] = (char) 0.

    The null/empty char is simply a value of zero, but can also be represented as a character with an escaped zero.

提交回复
热议问题