I have a problem with sounds in c++ on Windows 10

I have tried the Beep() function:

#include <iostream>
#include <windows.h>
using namespace std;

int main(){
    Beep(500,1000);
    Sleep(10000);

    return 0;
}

But it doesn't seem to produce any sound.

I tried printing out a \a characters, but it just makes Windows 10 play a default sound:

#include <iostream>
#include <windows.h>
using namespace std;

int main(){
    cout << '\a';

    return 0;
}

Any help, please!

Upvotes: 1

Views: 255

Answers (0)

Related Questions