Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4. class Student {
  5.  
  6. public:
  7.  
  8. Student();
  9. Student(std::string, std::string, int);
  10.  
  11. void setFacNumber(int fac) {
  12. facNumber = fac;
  13. }
  14.  
  15. int getFacNum() {
  16. return facNumber;
  17. }
  18.  
  19. private:
  20. std::string name;
  21. std::string surname;
  22. int facNumber;
  23.  
  24. };
  25.  
  26. Student::Student(std::string a, std::string b, int c) {
  27. name = a;
  28. surname = b;
  29. facNumber = c;
  30. }
  31.  
  32. int main() {
  33.  
  34. Student s;
  35. s.getFacNum();
  36.  
  37. return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement