Posted on 2009-04-15 21:03
小强摩羯座 阅读(217)
评论(0) 编辑 收藏 所属分类:
C++ &VC
**君子耻其言而过其行**
typedef int* pint;
typedef pint* ppint;
void func(ppint &x)
{
x = new int*;
*x= new int(32);
}
//使用方法
int **p=0;
func(p);
cout<<(**p)<<endl;
int *pV;
pV = new int(2); //这里注意与在cpp中与java中语法的差异
cout<<"PV = "<<(*pV)<<endl;
int ival = 1024;
int *pi = &ival;
int* &ptrVal2 = pi;