functions sound/delay/nosound in dos.h for c/c++

How can I get a version of language C/C++(downloaded??) where the functions sound, nosound, delay are present in the library DOS.H? For example it doesn't exist in the version c/c++ on code::blocks. What have I to do in order to use/find the functions sound/nosound/delay? thank you for your help !

Answers


In Windows programs you may use win32 functions:

  • Sleep() as a replacement for delay()
  • Beep() as a replacement for a combination of sound() + delay() + nosound().

download (sigh) a copy of TurboC/TurboC++.


if u r having above win 7,, Download borland Turbo c++ using dos box to listen to a beep for 500 miliseconds, use the following code,

#include<iostream.h>
#include<conio.h>
#include<dos.h>
void main()
{clrscr();  //for clearing the screen...
int x;
x=1000;         // here 1000 is the frequency of the sound 
sound(x);       //u can directly write integer in the place of x
delay(500);
nosound();      //it is necessary to close the sound or u will keep on hearing

getch();        // to wait at the end of program
}

Need Your Help

Are rCharts and DT compatible in rmarkdown?

r r-markdown rcharts

I am trying to create a document with rmarkdown that includes both plots from the rCharts package and a datatable using the DT library included in htmlwidgets.

how jquery handles map?

javascript jquery spring maven

Iam doing a spring mvc project with maven..I want to display a jqxGrid with items..am getting the item through MAP..The problem is ,i got grid but no items displaying..the data return from controll...