In C++ I need to create a function that will return an address to an object that will be an instance of different possible class, but I do not know at the compile time what