I'm passing references to pointers in order to use virtual functions.
Option 1 does what I intended and calls the appropriate derived class virtual function. Option 2 does not, suggesting no reference was passed. Since this does compile, then what does & mean in this context if not pass by reference?
1. Derived aDerived; Derived *pDerived = &aDerived; 2. Derived *pDerived = &Derived();
&is theaddress-ofoperator, it has nothing to do with references.