Defined class in c++