"); //-->
void func1( MYCLASS *&pBuildingElement ); |
void func1(MYCLASS *pMyClass); // 例如: MYCLASS* p = new MYCLASS; func1(p); |
void func1(MYCLASS *pMyClass) { DoSomething(pMyClass); pMyClass = // 其它对象的指针 } |
MYCLASS* p = NULL; func1(&p); void func1(MYCLASS** pMyClass); { *pMyClass = new MYCLASS; …… } |
interface ISomeInterface { HRESULT QueryInterface(IID &iid, void** ppvObj); …… }; LPSOMEINTERFACE p=NULL; pOb->QueryInterface(IID_SOMEINTERFACE, &p); |
void func1(MYCLASS *&pMyClass); { pMyClass = new MYCLASS; …… } |
MYCLASS* p = NULL; func1(p); |
class CObList : public CObject { …… // 获取/修改指定位置的元素 CObject*& GetAt(POSITION position); CObject* GetAt(POSITION position) const; }; |
CObject* pObj = mylist.GetAt(pos); |
pObj = pSomeOtherObj; |
CObject*& rpObj = mylist.GetAt(pos); |
*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。