make sounds (beep) with c++

前端 未结 12 648
暗喜
暗喜 2020-11-29 04:08

How to make the hardware beep sound with c++?

Thanks

12条回答
  •  庸人自扰
    2020-11-29 04:33

    #include
    #include
    #include
    using namespace std;
    
    int main()
    {
    
        Beep(1568, 200);
        Beep(1568, 200);
        Beep(1568, 200);
        Beep(1245, 1000);
        Beep(1397, 200);
        Beep(1397, 200);
        Beep(1397, 200);
        Beep(1175, 1000);
    
    cout<

提交回复
热议问题