2010-10-06 155 views

回答

4

您传递对象的地址。

SomeFunction(&test1); 
+0

&用于2件事情,引用和地址? – DogDog 2010-10-06 16:14:55

+0

@Apoc:'&'有3种含义:'&'是**按位和**运算符,'&'是**引用**类型,'&'是**的地址* *运营商 – Necrolis 2010-10-06 16:21:02

0

要调用该函数,需要使用操作符的地址(&)。所以在你的情况下:

Someclass test1; 

SomeFunction(&test1); 

如果你问的是指针如何工作,there's a detailed explanation here

相关问题