How do you clear the text off of cmd?

I am making a program that continuesly loops to the beginning and im wondering if there is a way to clear the text off of the cmd screen.
If there is a way you can do that please tell me.
If you need more info i will do my best to explain more.
There are several ways to do this, some of which I won't mention. You could (cout << endl;) until the screen is empty, but this will leave the cursor at the bottom of the console. There are probably 3rd party libs that provide a clear feature, but I'm not aware of any. Boost may have something, but I haven't used it so I couldn't tell you.
There are probably 3rd party libs that provide a clear feature, but I'm not aware of an


ncurses is one.

Although you probably shouldn't be clearing the console.
There are probably 3rd party libs that provide a clear feature, but I'm not aware of any.

This may be a stupid question but what is a lib?

Although you probably shouldn't be clearing the console.

why shouldnt i be?
A lib is a library. In this context, I was talking about a library of code. For example, iostream is a library (a standard lib at that). It provides all kinds of classes, objects and functions for you to use to create your program. There are other, non-standard, libs that provide additional functionality not provided by the standard libs. ncurses would be one.
Topic archived. No new replies allowed.