Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class figura{
- protected:
- string colore;
- public:
- void assegna(string);
- };
- void figura::assegna(string c){
- colore=c;
- }
- class figura2 : public figura{
- string bordo;
- public:
- void assegna(string,string);
- void mostra();
- };
- void assegna::figura2(string c,string d){
- colore=c;
- bordo=d;
- }
- void mostra::figura2(){
- cout<<colore<<endl<<bordo;
- }
- int main(){
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement