Data structures practice in c++