What are the advantages and disadvantages of having your members assigned with new?
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 withCode:m_member = new int(10); // or m_member = new int(*(Foo.m_member));
Code:class MyClass = new Derived();