Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cout << "\t- CREATE AN ACCOUNT -" << endl
- << "First name: ";
- cin >> fn;
- cout << "Last name: ";
- cin >> ln;
- cout << "Username: ";
- cin >> un;
- cout << "Password: ";
- cin >> pw;
- cout << "City: ";
- cin.ignore();
- getline(cin, city);
- cout << "State: ";
- cin >> ws;
- cin >> state;
- id = userID.size() + 1;
- User newUser(fn, ln, un, pw, city, state, id);
- userID.push_back(newUser);
- bool more = true;
- string interests;
- while (more)
- {
- cout << "Enter interest or 'stop' to finish: ";
- cin >> interests;
- transform(interests.begin(), interests.end(), interests.begin(),::toupper);
- if (interests == "STOP")
- more = false;
- else
- {
- transform(interests.begin(), interests.end(), interests.begin(),::tolower);
- newUser.setInterests(interests);
- }
- }
- cout << "\n\t*** Account successfully created. You may now log in ***\n" << endl;
- return choice = "0";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement