Root base class in C++
There is no common root class. Use either void* to pass any object into a function, or better define some base class.
There is no common base class; but using a something like boost::any or more generally a template based approach is preferred over a void*.