Advertisement
Guest User

Untitled

a guest
Jan 13th, 2019
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. class figura{
  4. protected:
  5. string colore;
  6. public:
  7. void assegna(string);
  8. };
  9. void figura::assegna(string c){
  10. colore=c;
  11. }
  12. class figura2 : public figura{
  13. string bordo;
  14. public:
  15. void assegna(string,string);
  16. void mostra();
  17. };
  18. void assegna::figura2(string c,string d){
  19. colore=c;
  20. bordo=d;
  21. }
  22. void mostra::figura2(){
  23. cout<<colore<<endl<<bordo;
  24. }
  25.  
  26. int main(){
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement