data Structures implementation in c++