Code: Select all
int main()
{
system("pause");
system("cls");
return 0;
}
pause:
Code: Select all
#include <iostream>
int main(int argc, char *argv[])
{
std::cout << "Press [Enter] to continue...";
std::cin.ignore( 256, '\n' );
return 0;
}
Code: Select all
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("\033[2J");
printf("\033[1;1H");
return EXIT_SUCCESS;
}
Code: Select all
void clear()
{
printf( "\033[2J" );
printf("\033[1;1H");
}
Because right now, clear in a void function just prints something like "<-[2J" instead of actually clearing the screen.