call to undefined function error

How can I get this program to work?
And why didn't it work?

void dropbomb(void);
void main()
      printf("Press any key to drop bomb:");
void dropbomb(void)
      int x;

The error message I got was this. . .
call to undefined function 'sound'
call to undefined function 'delay'
call to undefined function 'nosound'

I am using borland C++ 5.2

Here's the definition in the help file about this error. . .
Your source file declared the current function to return some type other than void in C++ (or int in C), but the compiler encountered a return with no value. All int functions are exempt in C because in old versions of C, there was no void type to indicate functions that return nothing.

Don't understand on what to do???

Who is Participating?
AlexVirochovskyConnect With a Mentor Commented:
You code is OK. But test you setting:
sound/delay/.. it is DOS functions.
You must set DOS in you Target Windows.
For this goto View|Project , set mouse to you EXE , press right button and
chouse Target Expert from Popup Menu
and in Platform change to DOS.
Attention : it is only DOS! You can't
make, for example, Console Apps.
Have you created a project?
If not then this may affect the function calls.

What you have to do is create a new project.
Set the platform to Dos standard (as called in bc4), and accept all the other default options.

From there you should edit your source file provided in the project, and add the exact same code andthen it should work.

If you have created a project then what AlexVirochovsky has said should be correct.
rockmagickAuthor Commented:
Thank you very much!!  Worked great!!  Now all I have to do is learn why.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.