Search Results

Search found 1 results on 1 pages for 'exp0'.

Page 1/1 | 1 

  • Common protected data member in base class?

    - by EXP0
    I have a base class and several derived classes. The derived classes use some common data, can I just put those common data as protected member of the base class? I know the protected member breaks encapsulation sometimes, so I wonder if there is any good approach. Here is a specific example: class Base{ public: virtual void foo() = 0;

    Read the article

1