Diamond inheritance problem
-
- Posts: 77
- Joined: 25 Dec 2018, 10:58
Diamond inheritance problem
I have a diamond inheritance problem here,For the gcc compiler, how do I access the members of the base class
-
- Posts: 2
- Joined: 19 Feb 2024, 12:41
Re: Diamond inheritance problem
https://stackoverflow.com/questions/2659116/how-does-virtual-inheritance-solve-the-diamond-multiple-inheritance-ambiguit
If your shared-base class isn't virtual then you will have 2 copies in memory ... and there's no good way to say which copy you want to access.
If your shared-base class is virtual then you will have only 1 copy in the inheritance diagram and then you can access its members as with any base member.
HTH...
If your shared-base class isn't virtual then you will have 2 copies in memory ... and there's no good way to say which copy you want to access.
If your shared-base class is virtual then you will have only 1 copy in the inheritance diagram and then you can access its members as with any base member.
HTH...
Who is online
Users browsing this forum: No registered users and 4 guests