I'm trying to create a dynamic array in one function and then passing it to another function. However I am not able to get it to work ? can someone please tell me how to do this properly ?
Heres my code -
Cars* cars = new SportsCar;
for(int i = 0; i < 50; ++i)
carHandler = new CarHandler(cars,50);
Can someone tell me how to do this properly ?
CarHandler::CarHandler(Car* car_array,int numCars)
this->car_array = car_array;
this->numCars = numCars;