what is the header file of clrscr in Dev c++ ?
#include <conio.h> It's some old C library header
Yeah, what cheppu is trying to say. If you're lucky, you might have the <conio.h> thingy and the conio.o implementation linked to your stuff. My code::blocks IDE with MinGW has it, but I'm not sure about dev C++. There is no standard way to clear the console screen in C++ (probably in C too). You may either use a system() cstdlib function (the exact argument to give it varies between operating systems, in windows it's system("cls")) to clear the screen, after writing #include <stdlib.h> in C or #include <cstdlib> if you're using C++. Alternatively, write your own function! :-D C and C++ are both used to write operating systems and kernels for machines ranging from the ti-89 calculator, to UNIX/GNU-LINUX/Windows, to cool stuff like supercomputers and satellites and robots and cars. Perhaps as a beginner project, you can implement a cls() function that does more than print 80 '\n' characters.
system("cls") is alright for beginners, though (don't forget the double-quotes around the cls) in windows.
Join our real-time social learning platform and learn together with your friends!