char* s_gets(char* st, int n)
{
char* ret_val;+
int i = 0;
ret_val = fgets(st, n, stdin);
if (ret_val)
{
while (st[i] != '\n' && st[i] != '\0')
i++;
if (st[i] == '\n')
st[i] = '\0';
else
while (getchar() != '\n')
continue;
}
return ret_val;
}
用这个函数时,假如我输入von Wurstkasse时,中间的空字符不会导致后面的Wurstkasse丢掉吗