c++ - Compilation error: `Class' does not name a type -
i have pretty simple class called simulator in simulator.h
#include <iostream.h> #include <stdlib.h> class simulator { private: short int startfloor; short int destfloor; public: void setfloors(); void getfloors(short int &, short int &); };
now when compile it, error:
simulator.h:4: error: `class' not name type
what have got wrong here?
you need make class
lowercase (and should stop using deprecated iostream.h
header):
#include <iostream> #include <cstdlib> class simulator { // stuff here }
Comments
Post a Comment