I have a problem....I wrote program which makes computer beep, but there is no beep when executing a program. I included windows.h header, defined speed and wrote following line

Beep(2750, speed);

Why there is no beep?

You need to turn on the volume on your speakers.

thats not the problem!! I`m not so stupid..lol

Even if I`d turn on 1000 speakers I would get no beep.

I am usind Dev-C++...i think its gcc compiler....ill try to compile that with Visual C++

Are you sure you've actually got an internal speaker? Not all motherboards have a connector for it. (Does your computer make a beep when you turn it on..?)

Comments
You think of everything... -joeprogrammer

Are you sure you've actually got an internal speaker? Not all motherboards have a connector for it. (Does your computer make a beep when you turn it on..?)

I dont have internal speaker...i never get beep from computer

BTW: My motherboard is old and it was the cheapest one

In which case, you may aswell stop trying to get the non-existant speaker to make a noise ;)

If you don't care what the beep sounds like just print a '\a' character.

cout << '\a';

or

putchar('\a');
This article has been dead for over six months. Start a new discussion instead.