Tell me, please, is there a function for cleaning the screen in C++? Use the CONIO library does not offer: for it is not standard and used purely under Windows, do not waste time and do not offer cycles with a bunch of zero symbol conclusions. Argued that you can:
system ("Clear");
but G ++ compiler issues:
static.cpp: 29: 19: Error: 'System' Was Not Declared in This Scope
That is, I would like to see the library and the cleaning operator or the library under the systems (“”) for C++.
Answer 1, Authority 100%
To work System (“Clear”), connect stdlib.h for Windows Windows (“CLS”);
Cross-platform option:
if (System ("Clear)) System (" CLS ");
Answer 2, Authority 17%
- conio.h is really not under NIX.
- No one prevents the use of the TERMINFO and / or (N) CURSES type library. They are completely standard for * NIX
- CLS under Nix’ama is also not 🙂 Pure Windows Priblud
- and what prevents instead of System () make any EXEC for Bash with the necessary parameters?
-
or make
std :: cout & lt; & lt; std :: endl;
as many times as needed (and how much is needed? Here is the question).
Answer 3
clrscr ();
Try