You are trying to run
cls
command (to clear the screen) on the console using the
system()
.
cls
command only exists on DOS or command prompt on Windows.
system("cls");
If your program is running on Bash on Linux or MacOSX, you can try
clear
.
system("clear");