Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. Contact::Contact(const char *name, const long long *phoneNumber, int numOfPhoneNumber)
  2. {
  3. if (name != 0)
  4. {
  5. strncpy(this->contactName, name, 19);
  6. contactName[19] = '\0';
  7. ArraySize = numOfPhoneNumber;
  8.  
  9. phoneNumbers = new long long[ArraySize];
  10.  
  11. for (int i = 0; i < ArraySize; i++) {
  12. if (phoneNumber[i] > 10000000000 && phoneNumber[i] < 999999999999) {
  13. phoneNumbers[i] = phoneNumber[i];
  14. }
  15. }
  16. }
  17. else {
  18. *this = Contact();
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement