first of all i hope this isnt a dublicate. Im am a java programmer and changing to c++ now. In java you can do like this
Object obj = new Object();
and to my understanding you can the same thing in c++ (seeing how obj in java will only be saved in the variable as a reference) like this:
Object* obj = new Object();
My question is this: How long does this object live? does it live as long as the pointer does ? also, is this possible to do will member initilazion of an object ? And if so will the object live as long as the pointer is saved as a member vairable (until that object you store it in is destroyes)?
Srry for any typos. Have a nice day/nigth!