因为 puts 接受的参数为char* ,字符数组。 修改为 puts("\n"); 试一下。
因为 puts 只接受的参数为char* 字符数组,你可以看到错误提示提示传参不是const char * ,你应该将修改为 puts("\n");