请看下面的代码
车辆管理器.h
#pragma once
#include "Vehicle.h"
class VehicleManager
{
public:
VehicleManager(int size);
~VehicleManager(void);
bool add(Vehicle *v);
void display();
int getCount();
Vehicle **getList();
private:
int count;
int maxVehicles;
Vehicle** vehicles;
};
车辆管理器.cpp
//Other Code
Vehicle VehicleManager::**getList()
{
return vehicles;
}
//Other Code
在这里,我无法返回数组。如何从函数返回动态指针数组?请帮忙!