I got "expression must have class type" error while defining method in c++ struct.. I do not know why?