Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 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. cout<<"Vuoi reeinserire l'utente?";
  19. char ins;
  20. if(ins == 'si')
  21. {
  22. void Login(utenti, n, k);
  23. }
  24. return;
  25. }
  26.  
  27. cout<<"Inserisci la password: ";
  28. cin>>pass;
  29. while(pass != utenti[k].password)
  30. {
  31. cout<<"Le password non corrispondono!";
  32. cout<<"Reinserire la password!";
  33. cin>>pass;
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement