声明一个数组
char test[10]
错误用法1
test="fuzhi";
错误用法2
test++
错误用法3
Do(test);
void Do(char *p)
{
p="fuzhi";
}
可以下面用
Do(test);
void Do(char *p)
{
p[0]=‘f’;
p[1]='z'
}
test是一个数组常量,不能当做指针来用
声明一个数组
char test[10]
错误用法1
test="fuzhi";
错误用法2
test++
错误用法3
Do(test);
void Do(char *p)
{
p="fuzhi";
}
可以下面用
Do(test);
void Do(char *p)
{
p[0]=‘f’;
p[1]='z'
}
test是一个数组常量,不能当做指针来用