“Press Any Key to Continue” function in C

后端 未结 5 1339
無奈伤痛
無奈伤痛 2021-01-30 14:15

How do I create a void function that will work as \"Press Any Key to Continue\" in C?

What I want to do is:

printf(\"Let the Battle Begin!\\n\");
printf(         


        
5条回答
  •  攒了一身酷
    2021-01-30 14:42

    Try this:-

    printf("Let the Battle Begin!\n");
    printf("Press Any Key to Continue\n");
    getch();
    

    getch() is used to get a character from console but does not echo to the screen.

提交回复
热议问题