在visual studio上使用scanf_s输入字符串报错,如
scanf_s("%s", name);
这是因为scanf_s在读取字符串时,需要提供一个数字以表明读取多少个字符,以防止溢出。
scanf_s("%s", name, 20);
在visual studio上使用scanf_s输入字符串报错,如
scanf_s("%s", name);
这是因为scanf_s在读取字符串时,需要提供一个数字以表明读取多少个字符,以防止溢出。
scanf_s("%s", name, 20);