"?" />
Z
Z
zRrr2021-02-17 22:54:48
OOP
zRrr, 2021-02-17 22:54:48

How to remove a large number of "this->"?

There are two classes, the first class inherits from the second. Is there some more "elegant" way to access inherited class members in the first class without using "this-> var "? It's just that in this case, a huge number of "this->" does not look very good. There must be a more rational approach.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zRrr, 2021-02-17
@zRrr

The design
using Base::var;
solves the problem

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question