I'm new to C++ and I'm wondering what's the best way to reconstruct/reinitialize an object? My minimal code looks like this:
typedef boost::shared_ptr<Object> PObject;
int main()
{
PObject SomeObject;
SomeObject = PObject(new Object);
// some code
*SomeObject = Object();
}
I feel that's not the right way to do it. Could someone show me the best way to do it? I just want to know how to reconstruct/reinitialize an object. Thanks!