一个输入字符串的问题
有时候用gets去给字符数组输入一个字符串不行,但改为scanf就行了;为什么??
[解决办法]
- C/C++ code
printf("input the string");getchar(); /* 加上这一句试一试*/gets(str);printf("\nwhich char do you want to copy in begining:");
发布时间: 2012-05-07 12:40:40 作者: rapoo
一个输入字符串的问题
有时候用gets去给字符数组输入一个字符串不行,但改为scanf就行了;为什么??
[解决办法]
printf("input the string");getchar(); /* 加上这一句试一试*/gets(str);printf("\nwhich char do you want to copy in begining:");