This topic has been archived. It cannot be replied.
-
工作学习 / 学科技术讨论 / void func(CString **pp) and void func(CString *&p), 这2个函数的参数有何区别?
-tonyhao(tonyhao);
2008-4-27
(#4419720@0)
-
The second one is not correct. &p is the addr of p, then you use its value to point to CString.
-kwirky(kwirky);
2008-4-28
(#4421326@0)
-
同学,人家那个是C++。第二个是指向reference的Cstring 指针。类似第一个是CString **, 第二个是Cstring *。
-canadiantire(轮胎 - favete lingui);
2008-4-28
(#4421507@0)
-
引用就是静态指针,这2个函数并无本质不同,调用参数不同。CString *p;
func(&p) //func(CString** p)
func(p) // func(CString*&p)
-baalinca(出狱);
2008-4-28
{73}
(#4422157@0)
-
正解,问问题的朋友可以试这样解决:化几分钟写一段测试小程序,运行比较看看.
-thunderbolt(孙悟空);
2008-6-23
(#4518031@0)
-
func(CString *&);function-wise, is the same as func(CString *) that allows you to operate CString object.
For object-access, is the same as func(CString **) that allows operate both CString object and CString * object.
-diresu(makeITwork);
2008-7-4
{202}
(#4537254@0)