两种解决方案: 直接给第三个参数传为 指定int类型值 scanf_s("%s", &info[0], 1); 强制转换一下类型 scanf_s("%s", &info[0], (int)sizeof(info[0]));