Strange beep when using cout

前端 未结 4 1631
北海茫月
北海茫月 2021-01-18 19:41

today when I was working on some code of mine I came across a beeping sound when printing a buffer to the screen. Here\'s the mysterious character that produces the beep: \'

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-18 20:12

    char 7 is the ASCII code for BELL. Writing this character to the console causes the computer to emit a beep. It is perfectly normal.

提交回复
热议问题