Hi ALL.
Basic Question.
sample:
class MyClass
{
....
MyClass(int* int_p_) : (int_p_ = p_int_) ;
private:
int* p_int_;
};
==========================
//somewhere on system; I have
int real_value; // may be = 100
//so after I instance a MyClass;
MyClass mc_(&real_value);
//and deleted it
delete mc_;
//the real_value will also be deleted.and leave me a hang prt.I don't want
that.
//any suggestion? Use auto_prt or reference?
//what's the right expression?
//Sorry ,new c++er.
//Thank you very much.