0
定義隊列和airportSim類。定義私有類的構造函數
class Queue
{
public:
Queue(int setSizeQueue = 20);
//Queue's contents
}
class airportSim
{
public:
airportSim(int setSizeRunway = 20);
private:
Queue airQueue;
Queue groundQueue;
//Other airportSim contents.
}
Queue::Queue(int setSizeQueue)
{
//Contents of airportSim constructor supposed to come here.
}
airportSim::airportSim(int setSizeRunway)
{
airQueue(setSizeRunway);
groundQueue(setSizeRunway);
}
它說它無法訪問構造函數。任何人都知道如何定義隊列的構造函數?
真棒。忘記了那個神奇的代碼!非常感謝! –