Let me tell u, that I AM A NEWBIE to C++..

I want to use sound in C++ (I use Borland Turbo C++ 4.5 because, this is used in our college..)

To use sound files, I browsed net and came to know that we may play sound using the
sound(), delay(), nosound(), in the dos.h directory.

But when i execute this program:

#include "dos.h"
int main()
{
    sound(100); delay(5000); nosound(); return(0);
}

But it gives three errors:

Compiling NONAME00.CPP:
Error NONAME00.CPP 5: Call to undefined function 'sound' in function main()
Error NONAME00.CPP 5: Call to undefined function 'delay' in function main()
Error NONAME00.CPP 5: Call to undefined function 'nosound' in function main()

..
So I checked the dos.h directory fns (In HELP )and found there are none of the three fns in the list.. Not even the beep fn is available..

Please help me!!!!!!!!

Recommended Answers

All 2 Replies

Use the manual for Borland 4.5 for the commands you need. Not the web.

I'm unable get the solution for this out of the manual..

Please help if u can..

(well, one thing i came to learn is, that the func'ns i asked were present in Version3 of turbo c.. I guess the v 4.5 of mine doesn't have that)
So, now my doubt is, what is the alternative for music in v 4.5? Newer versions should be better right?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.