代码如下:
int getString(char * source, char *strPtr[])
{
char* sta = source; char* mot = sta;
int count = 0;
while (*mot)
{
if (*mot == ' ')
{
*mot = '\0';
strPtr[count++] = sta;
sta = (mot + 1);
}
mot++;
}
strPtr[count++] = sta;
return count;
}
呃,对函数题出现格式错误这种错误感到非常奇怪,老师能帮忙看看代码哪有问题吗
Comments