Implementation of datas structures in C++