'new' member variables of a 'new' class?
What are the advantages and disadvantages of having your members assigned with new?
Code:
m_member = new int(10);
// or
m_member = new int(*(Foo.m_member));
I have done this before, but can't remember what my reasoning was other than "Let's try it!" (I just came back to programming after a bit of a hiatus). Now I'd like to know what would be the use of such things in a class when the class is allocated on the heap already with
Code:
class MyClass = new Derived();