Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1.  
  2. class Text{
  3.  
  4. public:
  5. Text* txt;
  6. int n;
  7. Text();
  8. void Add(Text A);
  9. void Show();
  10.  
  11. };
  12.  
  13.  
  14. class Symbol:public Text{
  15. public:
  16. const char * sym;
  17. Symbol(const char *m);
  18. void Show();
  19. };
  20.  
  21. void Text::Show(){
  22. for(int i=0;i<n;i++)
  23. this->txt[i].Show();
  24. }
  25.  
  26. Создаю экземпляры классов так:
  27. Text A;
  28. A.Add(Symbol("L"));
  29. A.Add(Symbol("L"));
  30. A.Show();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement