HICONT

TRecord

Nov 18th, 2022
534
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #pragma once
  2. #include <string>
  3.  
  4. using namespace std;
  5. class TRecord
  6. {
  7. private:
  8.     string name;
  9.     int value;
  10. public:
  11.     TRecord(string _name = "", int _value = 0)
  12.     {
  13.         name = _name;
  14.         value = _value;
  15.     }
  16.     void setvalue(int k)
  17.     {
  18.         value = k;
  19.     }
  20.     int getvalue()
  21.     {
  22.         return value;
  23.     }
  24.     string getname()
  25.     {
  26.         return name;
  27.     }
  28. };
Advertisement
Add Comment
Please, Sign In to add comment