N
newsock
1. What to do to force an auto_ptr release the object it pointing at before
reaching the end of the scope it resides?
2. If a class is defined as:
class Student
{
int nAge;
int nID;
char sAddress[100];
};
And two Student objects are created: student1 and student2.
Using auto_ptr, what should do to make "student1" and "student2" point to
the same address?
reaching the end of the scope it resides?
2. If a class is defined as:
class Student
{
int nAge;
int nID;
char sAddress[100];
};
And two Student objects are created: student1 and student2.
Using auto_ptr, what should do to make "student1" and "student2" point to
the same address?