Advertisement
Coriic

Untitled

Jun 16th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4. class TextList{
  5. private:
  6. class wezel{
  7. public:
  8. char* tekst;
  9. wezel* next;
  10. wezel* prev;
  11. };
  12. wezel* begin;
  13. wezel* end;
  14. public:
  15. TextList(): begin(0), end(0){};
  16. ~TextList();
  17. void dodaj(const char* txt);
  18. };
  19.  
  20. TextList::~TextList() {
  21. wezel* tmp;
  22. while(begin!=0){
  23. tmp=begin;
  24. begin=begin->next;
  25. delete tmp->tekst;
  26. delete tmp;
  27. }
  28. begin=0;
  29. end=0;
  30. }
  31.  
  32. void TextList::dodaj(const char* txt) {
  33. wezel* tmp;
  34.  
  35.  
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement