Lets say i want a function to take a class as a parameter but i do not know the class in advance or i want it to be able to take different classes, how can i do it?
Class object;
AnotherClass antherObject;
function(Class &object)
{
//DO STUFF
};
How can i make "function" take "AnotherClass" as a parameter as well? Overloading is a solution but i would still have to copy the code again. Is there another way?