Ok I have no idea why I'm getting this error. I'm guessing its the fact I'm trying to return something from another class but I don't know how else to do it.

#ifndef Floor_h
#define Floor_h

#include <queue>

#include "Passenger.h"

using namespace std;

class Floor

   void recievePassenger(Passenger p, int time)
   Passenger movePassToElevator();
   void addWaitingPassenger(Passenger p);
   int sizeOfWaitQueue();

   queue <Passenger> passengersWaiting;
   queue <Passenger> passengersFinished;

}; // end class Floor

#endif // Floor_h

The error is with the Passenger movePassToElevator(); line. I tried changing it to return the queue of passengersWaiting instead but it didn't like that either (same error). Google wasn't much help either and the only other error I found like that on here was for an array of chars...

And I just want the first passenger in queue moved so it can theoretically go on the elevator...

Recommended Answers

All 3 Replies

line 16: semicolon is missing at end of the line.

Gah. So dumb...worked fine heh.

Thanks! I've literally been staring at that for an hour...sad...

I've done that a time or two too. That's why another pair of eyes are often useful.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.