Advertisement
Whistik

Untitled

May 5th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <concrt.h>
  4.  
  5. using namespace std;
  6. bool isLogged = false;
  7.  
  8. int main() {
  9.    
  10.     if (isLogged == false) {
  11.         string name = ""; string password = "";
  12.         cout << "Zadej jmeno: "; cin >> name;
  13.         cout << "Zadej heslo: "; cin >> password;
  14.         void clientLogin(string name, string password);
  15.     }
  16.     else {
  17.         // je prihlasen
  18.     }
  19.  
  20.     Concurrency::wait(20000);
  21.     return 0;
  22. }
  23.  
  24. void clientLogin(string name, string password) {
  25.     if (name == "root" && password == "toor") {
  26.         cout << "Prihlasen";
  27.         isLogged = true;
  28.     }
  29.     else {
  30.         cout << "Spatne udaje";
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement