+ 4
Probleme of inheritance 🥺💔
If I have a class derived from two classes base And I have a pointer of first base How I can reach the second base from this pointer? I have used type casting but it gave me wrong values Note: I don't want to make a base clase of two bases I have
2 odpowiedzi
+ 2
Interesting question, may I suggest a few things though?
* No need for @ in the tags, a simple 'C++ class inheritance' will do fine.
* Write readable text for the question title. FYI, title and tags are the ones usable by search feature. So you might wanna make them be clear and relevant.
(Edit)
Tags and title updated
Thank you for understanding 👍
+ 2
I found a solution to the problem .... I found that there is a difference between static casting and dynamic casting
I understood that dynamic casting is useful for converting at runtime unlike static cast