scanf_s("%c %c", &sh, sizeof(sh), &cd, sizeof(cd));sizeof(sh) 这个参数就是要读取的长度 嫌麻烦就用scanf ,vs中不能用的话就在文件开头加入#define _CRT_SECURE_NO_WARNINGS