|I had the very same problem, luckily I found a |
solution. Although I am still learning c++!
Here is an example:
using namespace std;
Beep(440,100);//This is note A
Sleep(1000);//Pauses the program for 1 second
The 'Beep(,);' function will sound a frequency in
In the 'Beep(100,100);' function their are 2 numbers,
the first number is the frequency. And the second
number is the time it lasts in milliseconds. So 1000 milliseconds will be 1 second.
The frequency in hertz is 1(really high pitched) to
about a few thousand (really low).
The noise that will sound will come from inside the
computers case, from the computers pizo-electric
speaker on its motherboard.(not all computers have
one, I think). You can't change the volume(I think).
This Beep function was is still used, normally as your
computer tuns on it will beep!