Hi!
Im new to C++ and have been reading through C For Dummies Volume 1
I am using Borland C++ 5.5.1
the book states that although it is written for C the book works for C++ as well.
in the book there is the following example that is to be typed in, yet it will not work. Could anyone help?
Thanx!
The code...............
#include<stdio.h>
#include<conio.h>
#include <dos.h>
void dropbomb(void);
void main()
{
printf("Press any key to drop bomb:"
getch();
dropbomb();
printf("\nYikes!\n"
}
void dropbomb()
{
int x;
for (x=880;x>440;x-=10)
{
sound(x);
delay(100);
}
nosound();
}
QBasic is fun! Go see what I've done!
Im new to C++ and have been reading through C For Dummies Volume 1
I am using Borland C++ 5.5.1
the book states that although it is written for C the book works for C++ as well.
in the book there is the following example that is to be typed in, yet it will not work. Could anyone help?
Thanx!
The code...............
#include<stdio.h>
#include<conio.h>
#include <dos.h>
void dropbomb(void);
void main()
{
printf("Press any key to drop bomb:"
getch();
dropbomb();
printf("\nYikes!\n"
}
void dropbomb()
{
int x;
for (x=880;x>440;x-=10)
{
sound(x);
delay(100);
}
nosound();
}
QBasic is fun! Go see what I've done!