All pastes #1894104 Raw Edit

using- Deklaration

public cpp v1 · immutable
#1894104 ·published 2010-07-03 21:41 UTC
rendered paste body
#include <iostream>using namespace std;class Basis{  public:    void hallo()    {      cout << "Basis::hallo()" << endl;    }    void gehtNicht()    {      cout << "Basis::gehtNicht" << endl;    }};class Abgeleitet :private Basis //private Vererbung{  public:    void foobar()    {      cout << "Abgeleitet::foobar" << endl;    }    using Basis::hallo; //using- Deklaration im public- Teil};int main(){  Basis b;  b.hallo();  b.gehtNicht();  Abgeleitet a;  a.foobar();  // a.gehtNicht;  a.hallo();}