c++ clear console
To clear the console in C++, you can use the following steps:
- Include the necessary header file for input and output operations:
#include <iostream>
- Use the system("CLS") command to clear the console screen:
system("CLS");
- Return 0 at the end of the main function:
int main() {
// Other code
system("CLS");
// Other code
return 0;
}