Contact.class.cpp 707 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #include "Contact.class.hpp"
  2. Contact::Contact(void) {
  3. return ;
  4. }
  5. Contact::~Contact(void) {
  6. return ;
  7. }
  8. void Contact::setContact(char *secret, char *first_name, char *last_name, char *nickname, char *number) {
  9. if (secret[0] == 0) {
  10. secret[0] = 'N';
  11. secret[1] = 'A';
  12. }
  13. this->_secret = secret;
  14. if (first_name[0] == 0) {
  15. first_name[0] = 'N';
  16. first_name[1] = 'A';
  17. }
  18. this->first_name = first_name;
  19. if (last_name[0] == 0) {
  20. last_name[0] = 'N';
  21. last_name[1] = 'A';
  22. }
  23. this->last_name = last_name;
  24. if (nickname[0] == 0) {
  25. nickname[0] = 'N';
  26. nickname[1] = 'A';
  27. }
  28. this->nickname = nickname;
  29. if (number[0] == 0) {
  30. number[0] = 'N';
  31. number[1] = 'A';
  32. }
  33. this->number = number;
  34. }