Guest User

Untitled

a guest
Jan 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1.  
  2. // Navn.h
  3.  
  4. #ifndef Navn_h
  5. #define Navn_h
  6.  
  7. #include <string>
  8.  
  9. class Navn
  10. {
  11. private:
  12.     static int antall;  // Klassevariabel for å holde styr på hvor mange navn som ligger i lista.
  13.     std::string navn;   // Data-del som inneholder et navn.
  14.     Navn* neste;        // Nestepeker.
  15.  
  16. public:
  17.     Navn(std::string nvn, Navn* nst);   // Konstruktør
  18.     ~Navn();                            // Destruktør
  19.     std::string hentNavn() const;       // get navn
  20.     void settNeste(Navn* nst);          // set nestepeker
  21.     Navn* hentNeste() const;            // get nestepeker
  22.     static int hentAntall();            // get antall instanser
  23. };
  24.  
  25. #endif
Add Comment
Please, Sign In to add comment