I have a question for inherited variables. Parts of my source code:
class Piston{
The RectilinearTransducer contains m_piston, which is always a RectlinearPiston! But m_piston is inherited by the Transducer class, and I cannot use the setGridSize () function.
error message: error C2039: "setGridSize": no "Piston" element
The setGridSize function does not exist in the Piston class ...
How can I solve this problem? Should I overwrite the m_piston variable, how can I do this with virtual functions? The m_piston variable exists as Piston * m_piston because I inherited it from the Transducer class.
thanks for the help
source share