c++ - During inheritance, is the base class's base classes inherited also? -


is a game engine that I am creating and I have a game object class. This is the Gamboobis class base class, which meets an ideal class. Now, a cube gets out of the class model.

So, I was wondering if the cube would be able to use members from the class game object class?

As long as the functions or variables are declared public or protected, you will have them inherited classes. Can reach.

that is

  class game object {public: int getID (zero); }; Class model: Public game object {}; Square Cube: Public Model {int useID (zero) {return get () IDID (+5); }};   

/ Henrik

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -