0

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!!!!!!!!

Edited by mike_2000_17: Fixed formatting

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by skshoyeb
0

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?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.