I have a function that takes a pointer as a parameter
if were to call the function like this...Code:int SetElement(unsigned int p_iIndex, Type* p_tType) { if ( p_iIndex < m_iMax ) { if ( m_vArray.at(p_iIndex) == NULL ) m_vArray.at(p_iIndex) = p_tType; return 0; } return -1; }
would this dynamically allocate the memory in the m_vArray variable?Code:SetElement(0, new Type);
I am hoping it does, but I am unsure.