While programming C on the old Turbo C++ compiler I can use the clrscr() method of the \"conio.h\" header file but not on Dev C++ 5.4.2.(It gives an unusual error Id returne
clrscr()
didn't get deprecated because it was never part of any standard. It was a vendor-specific function provided as an extension by Borland in the (also non-standard) <conio.h>
header. Modern compilers no longer provide this function.
There's a couple of ways to emulate it, and I'm sure you can find it here - just look at the links in the Related section on the right side.
please include stdlib.h file and then call system("cls") and enjoy.
#include<stdlib.h>
system("cls");
system("cls");
works fine instead of clrscr();
clrscr()
will not work untill you download & link conio.o in your project.
Download conio.h , conio.o & then copy paste conio.h in include folder & conio.o in lib folder.
Link conio.o in your project (Project->Project option->Parameters->Add Library or Object) ..
Then run it.
you can use system("cls");
instead of clrscr();
The Conio.h
header is not a part of C Standard Libary. According to wikipedia:
conio.h is a C header file used mostly by MS-DOS compilers to provide console input/output.1 It is not described in The C Programming Language book, and it is not part of the C standard library, ISO C nor is it defined by POSIX.
So you just don't have this header.
The errors you are getting are linker errors reporting that it can't find the clrscr()
function in any of the headers that hare available for it.
Also, check this question.