how to solve this error in c++ syntax error : 'void' should be preceded by ':'