Hey,
I am trying to return a pointer from a method. Below is a sample of my code.
1 2 3 4 5 6 7 8
CSubnode * CTest::GetSubNode()
{
return m_psubnode;//this is declared in CTest as CSunbnode * m_psubnode
}
//in another class
m_subnode = m_ptest->GetSubNode(); //m_subnode is declared as a pointer
Is this the correct why to return a pointer?
Any help will be greatly appreciated!!