error with class

class machinex {
public:
int id;
int type(bool x,bool y, bool z );
machinex (int y);
}
machinex.h:1:1: error: unknown type name ‘class’
machinex.h:1:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token

what is the problem with this class?
Compile the code as C++ instead of C.
Topic archived. No new replies allowed.