Guest User

Untitled

a guest
Sep 12th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.33 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. class login
  8. {
  9.     string username;
  10.     string password;
  11.     int month;
  12.     int day;
  13.     int year;
  14. public:
  15.     string setname(string name) { username = name; }
  16.     string setpass(string pass) { password = pass; }
  17.     int setmonth(int tempmonth) { month = tempmonth; }
  18.     int setday(int tempday) { day = tempday; }
  19.     int setyear(int tempyear) { year = tempyear; }
  20.  
  21.     void DataConfirm() { cout << "\n\nSo, your username is " << username << " and your password is " << password << ". \n\nYour date of birth is " << month << "/" << day << "/" << year << "."; }
  22.  
  23. };
  24.  
  25. int main()
  26. {
  27.     login User_1;
  28.  
  29.     string user, pass;
  30.     int monthdata, daydata, yeardata;
  31.  
  32.     cout << "Please enter in your desired username, password, and your date of birth (In numbers 01/01/1990).\n\n Username:";
  33.     cin >> user;
  34.     cout << "\nPassword:";
  35.     cin >> pass;
  36.     cout << "\n\nMonth of Birth:";
  37.     cin >> monthdata;
  38.     cout << "\nDay of Birth:";
  39.     cin >> daydata;
  40.     cout << "\nYear of Birth:";
  41.     cin >> yeardata;
  42.  
  43.     User_1.setname(user);
  44.     User_1.setpass(pass);
  45.     User_1.setmonth(monthdata);
  46.     User_1.setday(daydata);
  47.     User_1.setyear(yeardata);
  48.  
  49.     cout << "\n\n Thank you for signing up for our services. Below are your current settings.\n\n";
  50.  
  51.     User_1.DataConfirm();
  52.  
  53.     cin.get();
  54.     cin.get();
  55.  
  56.     return 0;
  57.  
  58. }
Add Comment
Please, Sign In to add comment