+ 1

Clearing Screen in loop

If I want to clear my screen in a loop which function I should use in c++ ? And which file is required to be included in C++

3rd Dec 2016, 4:42 PM
Ankit
5 odpowiedzi
+ 4
You can use system("cls"); in windows. but you need to include header file stdlib.h header file. For Linux or UNIX use clear instead of cls.
3rd Dec 2016, 4:56 PM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 2
you can use clrscr(); but use conio.h
3rd Dec 2016, 7:46 PM
Sandeep Chatterjee
+ 1
does clrscr() work in sololearn compiler in code playground. @sandeep chatterjee
3rd Dec 2016, 7:56 PM
Sagar
Sagar - avatar
+ 1
I don't know Sagar it may work
4th Dec 2016, 10:08 AM
Sandeep Chatterjee
+ 1
Whenever i am using clrscr() it says ERROR: not declared in scope even I have used conio.h header file. Am i missing something.
4th Dec 2016, 1:39 PM
Sagar
Sagar - avatar