...
for(int i = 0; i <= 3 ; i++){
system("cls");
turn(&A,&B,&C);
printf("<PlayerStat>\n");
printf("A : %d\nB : %d\nC : %d\n",A,B,C);
sleep(3);
}
I did it like this
I can't erase the cmd window Why is that.
system
cls
is a command that is only available at the command prompt in Windows.
Looking at the code sleep(3)
, it looks like a Unix-compatible environment. In Unix-compatible environments, you must use the clear
command instead of cls
. Note that in Windows, the first letter of the slip function is uppercase, and in Unix environments, the first letter of the slip function is lowercase.
If your environment is not Windows, replace system("cls")
with system("clear")
and run it.
© 2024 OneMinuteCode. All rights reserved.