Advertisement
Guest User

Untitled

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