Guest User

Untitled

a guest
Jul 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. class Para
  2. {
  3.     protected:
  4.         int wartosc;   
  5.     public:
  6.         const string klucz;
  7.         Para (string _klucz): klucz(_klucz) {}
  8.         int Get ()  { return wartosc; }
  9.         void Set (int _wartosc) { wartosc = _wartosc; }
  10. };
  11. class Slownik
  12. {
  13.     protected:
  14.             class Wezel
  15.             {
  16.                 public:
  17.                     Para element(/*chcialbym tu zainicjalizowac i tylko tu moge, ale nie mam co*/);
  18.                     Wezel *nast;
  19.                     Wezel(string klucz, int wartosc)
  20.                     {
  21.                        
  22.                         element.klucz = klucz; // a to juest dupa bo klucz jest const
  23.                         element.Set(wartosc);
  24.                         nast = NULL;
  25.                     }
  26.             };
  27. ...
  28. }
Add Comment
Please, Sign In to add comment