Hello,
I am using borland c++ compiler and windows 7 operating system. I am tryring to make delay using the delay() function under dos.h header file. But the compiler says "call to undefined function delay. Can any one help me what is the problem
Hello,
I am using borland c++ compiler and windows 7 operating system. I am tryring to make delay using the delay() function under dos.h header file. But the compiler says "call to undefined function delay. Can any one help me what is the problem
You can not use any function in the conio.h in Windows programs. This header is obsolete and most of the functions are only usable in "real" DOS.
Jim
Undefined reference is a linker error. You need to link against whatever static library defines delay(). Unfortunately, after Googling, I have no idea what library that would be. Try sleep? Sleep is defined in <unistd.h>
Thank you for your kind reply. The "sleep()" function under <dos.h> is working nicely also the "Sleep()" under <windows.h> is working. may be u are right, the delay() function will not work under windows 7.
bappi
Glad to help. If you'd ever like to try Linux development, things are relatively standard, and as far as I know, you won't find broken API stuff like this. Ubuntu is a pretty good distribution. I recommend it. You can also play Starcraft II on it just fine.
"I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008
"the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010
@cpjust you are correct, but dos.h and conio.h are considered obsolete....
Jim