Guest User

Untitled

a guest
Feb 9th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. string username;
  2. string password;
  3.  
  4. cout << "Register!n" << endl;
  5. cout << "Username: ";
  6. cin >> username;
  7. cout << "Password: ";
  8. cin >> password;
  9.  
  10. string newAcc = username;
  11. newAcc.append(".txt");
  12.  
  13. ofstream newAccount(newAcc.c_str());
  14. newAccount << username << ' ' << password << endl;
  15. newAccount.close();
  16.  
  17. string username;
  18. string password;
  19.  
  20. cout << "Login!n" << endl;
  21.  
  22. cout << "Username: ";
  23. cin >> username;
  24. cout << "Password: ";
  25. cin >> password;
  26. string Account = username;
  27. Account.append(".txt");
  28.  
  29. ifstream MyAccount(Account);
Add Comment
Please, Sign In to add comment