Advertisement
Frumkin

Untitled

Apr 27th, 2021
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. struct Person {
  4. std::string Firstname;
  5. std::string Lastname;
  6. unsigned char Age;
  7. unsigned char Height;
  8. unsigned char Weight;
  9.  
  10. Person(const std::string& firstname, const std::string& lastname, unsigned char age, unsigned char height, unsigned char weight) {
  11. Firstname = firstname;
  12. Lastname = lastname;
  13. Age = age;
  14. Height = height;
  15. Weight = weight;
  16. }
  17.  
  18. static void Print(const Person* person) {
  19. std::cout << person->Firstname << " " << person->Lastname << " is " << person->Age << " years old, weights " << person->Weight << " Killograms and is " << person->Height << " centimeters tall." << std::endl;
  20. }
  21. };
  22.  
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement