Function using object from base class or derived class

I've got a function Add which adds an object to the map I have.
If I set the parameters to

 
  Add(int, BaseClass*)


If I use an object of DerivedClass as an argument, I get a conversion error and same for the other way around. DerviedClass as parameter and BaseClass as argument. The method belongs to a separate class, ItemManager. I want to be able to put objects of both the BaseClass and DerivedClass in the method (not at the same time)
Topic archived. No new replies allowed.