Couple of ways to do this.
For your case the best thing to do is use the ASCII code for a beep.
You can add the beep with the following line of code:
cout << static_cast<char>(7);
Use that for your beep() function.
Or, make it the beep function
PS - I'm adding a new function to my library now...