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
{
   
public:

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

private:
  
   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...

Gah. So dumb...worked fine heh.

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

This question has already been answered. Start a new discussion instead.