Advertisement
Kagalive

Untitled

Sep 30th, 2020 (edited)
1,063
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. //Person.h
  2.  
  3. class Person
  4. {
  5. private:
  6.    std::string firstname;
  7.    std::string lastname;
  8.    int arbitrarynumber;
  9.  
  10. public:
  11.   std::string getName();
  12. };
  13.  
  14.  
  15. //Person.cpp
  16.  
  17. #include "Person.h"
  18.  
  19. std::string Person::getName()
  20. {
  21.  
  22.    return firstname + " " + lastname;
  23. }
  24.  
  25.  
  26.  
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement