const char *
#include <stdio.h>void foo(const char *p)
{
? p="world";
}
int main()
{
?? const char* q="Hello";
?? foo(q);
?? printf("%s\n",q);
?? q="world";
?? printf("%s\n",q);
}
Hello
world
posted on 2007-10-22 01:06 旅途 閱讀(174) 評論(0) 編輯 收藏 引用 所屬分類: C/C++