IN3013/INM173 - Object Oriented Programming in C++
class Node {
Table *table;
Name *name;
public:
Node(const char *n) :
table(new Table()), name(new Name(n)) {}
// ...
};
Rewrite this using auto_ptrs to avoid the need for a destructor.
Does this mean you don't need a copy constructor or an assignment operator?
(You'll need to read the auto_ptr class to answer this.)
You can include the auto_ptr class by saying
#include <auto_ptr.h>