Home c++ Cleaning the screen

Cleaning the screen




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%

  1. conio.h is really not under NIX.
  2. No one prevents the use of the TERMINFO and / or (N) CURSES type library. They are completely standard for * NIX
  3. CLS under Nix’ama is also not 🙂 Pure Windows Priblud
  4. and what prevents instead of System () make any EXEC for Bash with the necessary parameters?
  5. 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 ();


Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions