+ 4
'clrscr' isn't Standard C++ and also super outdated, you probably shouldn't use it. Are you using Borland Turbo C++? 'system("cls")' works, but only on windows. The linux equivalent would be 'system("clear")'. So you'd need to do some preprocessor hax to make it work cross-platform. System calls in general should be used with care, too. To be honest, the easiest way of clearing the console is just: std::cout << std::string(100, '\n'); Bit ugly but does the trick.
31st Oct 2016, 2:40 PM
Schindlabua
Schindlabua - avatar