I made a program that's working fine in Turbo C++. It makes a kind of squeaking sound that works because of changing frequencies played very quickly
#include<dos.>
void main()
{
for( int i=500 ; i<=2000 ; i++ )
{
sound( i ) ;
}
nosound() ;
}
How do I make this in Code Blocks? I tried using Beep() function but it's not working. Here is the code:
#include<windows.h>
int main()
{
for( int i=500 ; i<=2000 ; i++ )
{
Beep( i, 1 ) ;
}
return 0 ;
}