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