mirror of
https://github.com/szymon-jozef/ZUT-notatki.git
synced 2026-09-07 12:10:40 +02:00
21 lines
289 B
C++
21 lines
289 B
C++
#include <iostream>
|
|
|
|
class Bazowa {
|
|
protected:
|
|
int x;
|
|
|
|
public:
|
|
Bazowa(int x) : x(x) {}
|
|
};
|
|
|
|
class Pochodna : public Bazowa {
|
|
public:
|
|
Pochodna(int val) : Bazowa(val) {}
|
|
void wypisz() const { std::cout << x << std::endl; }
|
|
};
|
|
|
|
int main() {
|
|
Pochodna p = Pochodna(1);
|
|
p.wypisz();
|
|
}
|