【发布时间】:2014-04-14 00:59:16
【问题描述】:
我无法在此处或通过 Google 找到类似的问题,可能是因为我不知道我问的问题是否正确,所以不确定标题是否正确。但我正在使用如下代码:
Foo * foo = new Foo();
add(*foo); //Couldnt find any similar questions on this syntax?
void add(const Foo & foo){
//What exactly is foo here? How can i manipulate its members, foo. or foo-> ?
}
【问题讨论】:
标签: c++ pointers reference constants