C: scanf() hanging, getchar() not working to clear input

前端 未结 0 608
走了就别回头了
走了就别回头了 2020-12-04 10:29

The function is supposed to prompt a user for input, and then return a value, however it keeps hanging.

int foo(void) {
    printf("Enter a number: "         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题