由买买提看人间百态

topics

全部话题 - 话题: afdd
(共0页)
h**l
发帖数: 168
1
来自主题: Programming版 - function call?
The following code with function call can shift a string but the code
without function call can not. What might be the problem? Thanks!
_______________________________________________________
void shift(char a[])
{
int i=0;
while(a[i]) a[i] = a[++i];
}
int main()
{
char str[]= "afdd";
shift(str);
cout< return 0;
}
_____________________________________________________________
int main()
{
char str[]= "afdd";
int i=0;
while(str[i]) str[i] ... 阅读全帖
(共0页)