Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

\a doesn't beep

Status
Not open for further replies.

thelearners

Programmer
Jul 1, 2004
8
0
0
US
Hi,

Is '\a' suppose to make a beep sound? It's doesn't beep in my program. I use dev-c++ on window.
Thank for any help.

#include <iostream>
#include <stdlib.h>

int main()
{
int num;

puts("enter 2 will beep");
scanf("%d", &num);

printf("beeping the computer\a\a\a\n");

system("PAUSE");
return 0;
}
 
May be it depends on Windows onboard beeper driver (settings), not on a C run-time implementation.
For example, I have beeps on my VC++ Win NT workstaton...
 
So, is there anything I can do to make it works. If not what's the alternate command or keyword for the beep?
Thanks
 
Hi,

I just found out that my program actually does beep. But the sound is very very fade. I have to put my ear next to the speaker so I can hear it. But any other sounds (ie when I turn on the pc or from any web site that has sound), the sound is lound as normal. What's the problem?

Thanks.
 
Double click on your PC speaker in the system tray. The master volume control wil pop up. Check the master volume, wave and pc speaker. You probably have some combination that reduces the level.

By the way \007 is the same as \a. Not many people (including 'experienced programmers') know about \a.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top