Posted By

Desoxena on 12/21/10


Tagged


Versions (?)

Login system C++


 / Published in: C++
 

this is a login script for C++. Made/compiled in DEV-C++ (4.9.9.2) also used in my TASKMASTER360

  1. #include <string>
  2. #include <cstdlib>
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. string password;
  10. cout << "please enter your password to continue." << endl;
  11. cin >> password;
  12. if (password == "happy")
  13. {
  14. cout << "hello Evan!" << endl;
  15. system ("PAUSE");
  16. }
  17. else if(password != "happy")
  18. {
  19. cout << "WRONG PASSWORD" << endl;
  20. system ("PAUSE");
  21. }
  22. }

Report this snippet  

You need to login to post a comment.