Different data structures in c++