I need a cross platform solution for clearing the console in both Linux and Windows written in C++. Are there any functions in doing this? Also make note that I don\'t want
There is no generic command to clear the console on both platforms.
#include void clear_screen() { #ifdef WINDOWS std::system("cls"); #else // Assume POSIX std::system ("clear"); #endif }