Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. void Login(Utente utenti[], int n, int &k)
  2. {
  3. string pass, us;
  4. bool trovato = false;
  5. cout<<"Inserisci il nome utente: "
  6. cin>>us;
  7. for(int i = 0; i<n; i++)
  8. {
  9. if(s == utenti[i].Username)
  10. {
  11. k = i;
  12. trovato = true;
  13. }
  14. }
  15. if(trovato == false)
  16. {
  17. cout<<"Username non registrato!";
  18. return;
  19. }
  20.  
  21. cout<<"Inserisci la password: ";
  22. cin>>pass;
  23. while(pass != utenti[k].password)
  24. {
  25. cout<<"Le password non corrispondono!";
  26. cout<<"Reinserire la password!";
  27. cin>>pass;
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement