读书人

question about point,该如何解决

发布时间: 2012-03-11 18:15:39 作者: rapoo

question about point
sorry i can 't input chinese

i have a function
void removeFront(char* src)
{
int i;
for(i = 0;i <strlen(src)-1;i++)
{
*(src+i) = *(src+i+1);
}
}

when i use the function .the system always tell me that segmentation fault .

Anyone help me ? thx.

[解决办法]
cause your pointer was not allocated with appropriate memory
[解决办法]
How poor is my English! sigh!

读书人网 >C语言

热点推荐