Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- using namespace std;
- class login
- {
- string username;
- string password;
- int month;
- int day;
- int year;
- public:
- string setname(string name) { username = name; }
- string setpass(string pass) { password = pass; }
- int setmonth(int tempmonth) { month = tempmonth; }
- int setday(int tempday) { day = tempday; }
- int setyear(int tempyear) { year = tempyear; }
- void DataConfirm() { cout << "\n\nSo, your username is " << username << " and your password is " << password << ". \n\nYour date of birth is " << month << "/" << day << "/" << year << "."; }
- };
- int main()
- {
- login User_1;
- string user, pass;
- int monthdata, daydata, yeardata;
- cout << "Please enter in your desired username, password, and your date of birth (In numbers 01/01/1990).\n\n Username:";
- cin >> user;
- cout << "\nPassword:";
- cin >> pass;
- cout << "\n\nMonth of Birth:";
- cin >> monthdata;
- cout << "\nDay of Birth:";
- cin >> daydata;
- cout << "\nYear of Birth:";
- cin >> yeardata;
- User_1.setname(user);
- User_1.setpass(pass);
- User_1.setmonth(monthdata);
- User_1.setday(daydata);
- User_1.setyear(yeardata);
- cout << "\n\n Thank you for signing up for our services. Below are your current settings.\n\n";
- User_1.DataConfirm();
- cin.get();
- cin.get();
- return 0;
- }
Add Comment
Please, Sign In to add comment