Okay here's my dillema. I'm creating a class template, called RentalSystem. This RentalSystem is supposed to accept either a Car class or a Motorcycle class, with each having 3 derived classes for more specific types ( i.e. economy, luxury, midsize, etc. ). Now the way I have it setup is that a function within RentalSystem parses through the command file, and recieves each command. If a vehicle is supposed to be added, the vehicle type is compared with that of the 3 derived classes and the vehicle pointer is set to the address of the derived class. The problem is, now that I'm being asked to use a template, the project requirements prohibit me from explicity making any reference to Car or Motorcycle classes inside the template, i.e. it all has to be <T>. So what I can't figure out is how I'm supposed to create this derived object within the RentalSystem template without explicity creating a Economy object, etc. Sorry if that was unclear, if so I can clarify.
Thanks,
Chris