Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class SprzetRTV
- { protected:
- string nazwaU;
- bool stan;
- public:
- SprzetRTV(string n)
- {
- nazwaU=n;
- };
- bool wlacz(){stan="TRUE";};
- bool wylacz(){stan="FALSE";};
- string nazwa()
- {
- return nazwaU;
- }
- };
- class Radio : public SprzetRTV
- { public:
- Radio (string na) : SprzetRTV(na)
- {
- }
- string nazwa(){
- return "Radio"+ nazwaU;
- }
- };
- int main()
- {
- Radio r("Sony");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement