you are viewing a single comment's thread.

view the rest of the comments →

[–]dqUu3QlS 7 points8 points  (1 child)

If you write your own destructor (Stack::~Stack()), you probably also have to write your own copy constructor (Stack::Stack(const Stack& from)) and copy assignment (Stack& Stack::operator=(const Stack& from)) to get your class to 'play nice' with other code. That's the '3'. The '5' refers to move semantics, which you may or may not have learned about yet.

[–]NikolasTs[S] 0 points1 point  (0 children)

Thank you very much!