Beep

Hi there, I'm having a problem with the Beep() command. When I run the program below, no sounds comes out :(

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include<iostream>
#include<windows.h>

using namespace std;

int main()
{
Beep(523,500);
Beep(587,500);
Beep(659,500);
Beep(698,500);
Beep(784,500);
Beep(876,500);
Beep(982,500);
Beep(1050,500);
system("pause");
return 0;
}


I'm using Dev-C++ (by Bloodshed) and run Windows Vista. What am I doing wrong?
http://msdn.microsoft.com/en-us/library/ms679277%28v=vs.85%29.aspx

"Eventually because of the lack of hardware to communicate with, support for Beep was dropped in Windows Vista and Windows XP 64-Bit Edition."
Try std::cout<<'\a';
std::cout<<'\a'; doesn't work either. :(
closed account (zb0S216C)
Dev-C++ ? Thanks years old( Which probably means the headers and compiler are out-of-date ). Upgrade to Visual C++ or Code::Blocks.
Although I agree with the fact that Dev-C++ is outdated, this isn't caused by it. As Intrexa already said, it's because the functionality was simply removed.
Thanks for the help guys, and I've installed Visual C++ but unfortunately that didn't seem to help with the Beep() problem either. I think I'll just use PlaySound() instead.
Topic archived. No new replies allowed.