要在前面加一个空格 , 写作
scanf(" %d", &iUserChoice);
或者
scanf(" %c", &cPush);
原因见 :
https://gsamaras.wordpress.com/code/caution-when-reading-char-with-scanf-c/
要在前面加一个空格 , 写作
scanf(" %d", &iUserChoice);
或者
scanf(" %c", &cPush);
原因见 :
https://gsamaras.wordpress.com/code/caution-when-reading-char-with-scanf-c/