linux clear console cpp code example
Example 1: c++ clear console
#include <Windows.h>
int main() {
//print stuff
system("cls"); // clear console
}
Example 2: how to clear console c++
#ifdef __cplusplus__
#include <cstdlib>
#else
#include <stdlib.h>
#endif
if (system("CLS")) system("clear");