Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. cout << "\t- CREATE AN ACCOUNT -" << endl
  2. << "First name: ";
  3. cin >> fn;
  4.  
  5. cout << "Last name: ";
  6. cin >> ln;
  7.  
  8. cout << "Username: ";
  9. cin >> un;
  10.  
  11. cout << "Password: ";
  12. cin >> pw;
  13.  
  14. cout << "City: ";
  15. cin.ignore();
  16. getline(cin, city);
  17.  
  18. cout << "State: ";
  19. cin >> ws;
  20. cin >> state;
  21.  
  22. id = userID.size() + 1;
  23.  
  24. User newUser(fn, ln, un, pw, city, state, id);
  25. userID.push_back(newUser);
  26.  
  27. bool more = true;
  28. string interests;
  29.  
  30. while (more)
  31. {
  32. cout << "Enter interest or 'stop' to finish: ";
  33. cin >> interests;
  34.  
  35. transform(interests.begin(), interests.end(), interests.begin(),::toupper);
  36.  
  37. if (interests == "STOP")
  38. more = false;
  39. else
  40. {
  41. transform(interests.begin(), interests.end(), interests.begin(),::tolower);
  42. newUser.setInterests(interests);
  43. }
  44. }
  45.  
  46. cout << "\n\t*** Account successfully created. You may now log in ***\n" << endl;
  47.  
  48. return choice = "0";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement