-
c++ sound
I'm Just a beginner to c++, I have borland compiler version 3
and i just wanted to add some simple sounds to a console program. I saw a post that had something like.....
#include <dos.h>
main()
{
sound(7);
delay(100);
nosound();
return0();
}
I tried this but the compiler says
:call to undefined function sound
can you help????
-
Hi,
it didn't compile because the sound() function you saw in the other thread appearently was written by that programmer himself. So, if you want to have sounds in your own program you'll have to write these functions yourself or get them from somewhere else (maybe a free lib or any other source)...Maybe take a look at that thread again and send the poster a private message. He might give you a glance at his code ...
aloa
cody
-
reply
I believe that \a in a string would produce a system *beep*.
printf("\a");
-
Thanks guys for your help. But is there certain header file you can use for sound tones or something simple like that?
-
dos.h, function sound () nosound ()... etc.