Can you help me to write a copy constructor for this List, note that the Data is stored indirectly.
class List {
private:
struct Node {
Data *data;
Node *next;
};
Node *head;
};
You can assume you have a copy constructor of Data class.
Thank you.
See Question&Answers more detail:os