如何用c++使硬件发出蜂鸣声?
打印特殊字符 ASCII BEL(代码7)
ASCII BEL
cout << '\a';
Source https://bytes.com/topic/c/answers/127539-making-computer-speaker-beep#post443147