Root base class in C++

前端 未结 7 1529
逝去的感伤
逝去的感伤 2021-01-04 11:29

Every object in .NET inherits (directly or indirectly) from the common root base \"Object\". Is there such a common object root in C++? How do I pass any object to

7条回答
  •  梦谈多话
    2021-01-04 12:07

    There is no common root class. Use either void* to pass any object into a function, or better define some base class.

提交回复
热议问题