I tried to implement an IntCell class based on Weiss' book "Data Structures and Algorithms Analysis in C++". It's shown as in Fig. 1.18 of the textbook:
There are 2 questions:
-
If I want to follow Weiss' suggestion of adding additional initialization list into move constructor, how shall I modify the initialization part explicit IntCell()?
-
How to separate the interface and implementation of the code into .hpp and .cpp files? Especially, how to write proper code in .hpp and .cpp for the initialization part:
What if I want to include vector items also?
Thanks!
Aucun commentaire:
Enregistrer un commentaire