可能重複:
Difference between pointer to a reference and reference to a pointer參考變量接收對象
嗨, 我無法理解get(Event*& pEvent)
...是傳遞對象pEvent的地址參考的pEvent
.. (Event*& pEvent)
......引用將存在的不是它的函數內的局部範圍....
void classA::func()
{
Event* pEvent = NULL;
if (get((pEvent))
{
......//definition;
}
}
bool ClassA::get(Event*& pEvent)
{
...//definition;
}