my first step would be to create a specification file to make my class or struct
Code:
const int MAX=10; //garage can only hold 10 cars at one time
class carstack{
public:
bool IsEmpty() const;
bool IsFull() const;
void Push();
int Top() const;
void Pop();
private:
struct car_array[max];
};
I have 2 structs that I need to use one for the reading of input data called: "struct car" and another called: "struct time", which will be needed to calculate the time parked in garage and I will first need to convert time to military time to make it easier.
do these structs need their own .h file?
here are my two structs thus far:
Code:
struct time{
int hours;
char : ;
int minutes;
};
struct car{
char A_or_D; //used for Arrival or Departure in input file *not sure if this is right?
char license[6]; //license number of 6 characters in input
time carTime; //this is the instance of the above struct time
char AM_PM[2];
int num_moves; //progam needs to record the # times car was moved
};