I
I
Ivan Ivanov2014-03-11 21:48:33
Microsoft
Ivan Ivanov, 2014-03-11 21:48:33

How to clear console in c++?

In what ways except:
1) system("cls");(because the system is busy) "pause"
2)

for(int = 0; int < 25; i++) (нелогично)
                    cout << "\n";

can you clear the console?
PS the decision only under Win is possible - without a difference.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
cdkrot, 2014-03-11
@Csklassami

www.cplusplus.com/forum/articles/10515
See ways: "ncurses" and "conio.h".

I
Ivan Starkov, 2014-03-11
@icelaba

Is that more logical?
cout << string( 100, '\n' );
Under windows support.microsoft.com/kb/99261
starting from here #define PERR(bSuccess, a

S
S0meb0dy N0b0dy, 2014-03-21
@galexcode

printf("\e[1;1H\e[2J");
Works everywhere

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question