VS2015中gets_s用法问题
#include<stdio.h>#include<string.h>
int main()
{
char s[80], c;
void enter(char s[]);
printf("请输入要删除的字符");
scanf_s("%c", &c);
void dele(char s[], char c);
void print(char s[]);
return 0;
}
void enter(char s[])
{
gets_s(s);//此处报错
}
void dele(char s[], char c)
{
int i, j;
for (i = j = 0;s[i] != '\0';i++)
if (s[i] != c)
s[j++] = s[i];
s[j] = '\0';
}
void print(char s[])
{
printf("%s\n", s);
}