I have the following. In getB( ) function when I return the Object b, would I have any problems. I think If I do " B b = new B( ); " and returning &b would cause problem as the function returns, b goes out of scope. Is it true even in my case?
C( A& aa);
B& getB( );
A * m_aa;
B& C::getB( )
//do some initialization of B here