void main() {
char name[64], identity[64];
printf("Welcome to ABC Computer Store!\n");
printf("Please enter your name: ");
scanf_s("%s", &name, 63);
printf("Please enter your IC/Passport: ");
scanf_s("%s", &identity, 63);
}
每当用户输入多个单词时,它将跳过第二个scanf_s。例如,当它要求"请输入您的姓名:"如果用户输入" John"如果用户输入" John Cena"要求IC / Passport的第二个scanf_s,它会跳过它,我知道这与下一行有关\ n输入按钮问题,但我无法修复它......