clear the screen through program on linux

M

manoj.bhosale

Hello Friends,
I am Manoj, just started learning c++ on linux.
In 'C' or 'C++' program on DOS/Windows we use clrscr(); with
#include<conio.h> file included. In linux conio.h file is not exist,
then how this can be done?.
 
L

Lionel B

Hello Friends,
I am Manoj, just started learning c++ on linux.
In 'C' or 'C++' program on DOS/Windows we use clrscr(); with
#include<conio.h> file included. In linux conio.h file is not exist,
then how this can be done?.

conio.h is a Windows-specific header. See the FAQ: http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.20

The easiest way to clear the screen (in a terminal session on Linux) is probably to issue the "clear" command (type "man
clear"), which you can invoke from your program by calling:

system("clear");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top