吾生也有涯 而知也无涯
//......
void *f;
int i=1,*p;
f=&i;
p=(int*)f;
f=p;
cout<<"p is "<<p<<*p;
cout<<"f is "<<f<<*f; // void 的值不能显示,故编译报错
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3