I have a 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 I compile it, I get this error:
simulator.h:4: error: `Class' does not name a type
What have I got wrong here?
You need to make Class lowercase (and should probably stop using the deprecated iostream.h header):
#include <iostream>
#include <cstdlib>
class Simulator {
// Stuff here
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With