Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 11th, 2012  |  syntax: None  |  size: 0.19 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Using directive in Derived Class changes inheritance to Public
  2. class A{
  3. protected:
  4.     int x;
  5. public:
  6. };
  7.  
  8. class B: public A {
  9. public:
  10.     using A::x;
  11. };
  12.  
  13. int main(){
  14.   B b;
  15.   b.x = 2;
  16. }