fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4.  
  5. using namespace std;
  6.  
  7. bool IsPasswordValid(string password);
  8.  
  9. int main()
  10. {
  11. string Password;
  12.  
  13. cout << "Hello, please make a Password: ";
  14. getline(cin, Password);
  15.  
  16. bool IsPasswordValid;
  17.  
  18. while (IsPasswordValid = true)
  19. {
  20. if (Password.size() < 5)
  21. {
  22. cout << "You have write the minimum of 6 characters for your password." << endl;
  23. break;
  24. }
  25.  
  26. else
  27. {
  28. for (int i = 0; i < ; i++)
  29. {
  30. for (int j = 0; j < ; j++)
  31. {
  32. if ()
  33. {
  34. break;
  35. }
  36. }
  37. }
  38. }
  39.  
  40. }
  41. system("pause");
  42. }
  43.  
  44. bool IsPasswordValid(string password)
  45. {
  46. std::string s;
  47. std::string alphabet = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
  48. int forthis = 0;
  49. forthis++;
  50. int characters = 0;
  51. int count = 0;
  52. int Numbers[9];
  53. Numbers[0] = 0;
  54. Numbers[1] = 1;
  55. Numbers[2] = 2;
  56. Numbers[3] = 3;
  57. Numbers[4] = 4;
  58. Numbers[5] = 5;
  59. Numbers[6] = 6;
  60. Numbers[7] = 7;
  61. Numbers[8] = 8;
  62. Numbers[9] = 9;
  63.  
  64.  
  65. for (int i = 0; i < s.length(); i++)
  66. {
  67. for (int j = 0; j < alphabet.length(); j++)
  68. {
  69. for (int g = 0; g < characters; g++)
  70. {
  71. for (int h = 0; h < Numbers[forthis]; h++)
  72. {
  73. if (s[i] == alphabet[j])
  74. {
  75. count++;
  76. break;
  77. }
  78. }
  79. }
  80. }
  81. }
  82. return 0;
  83. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:18:27: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  while (IsPasswordValid = true)
                           ^
prog.cpp:28:24: error: expected primary-expression before ‘;’ token
    for (int i = 0; i < ; i++)
                        ^
prog.cpp:30:25: error: expected primary-expression before ‘;’ token
     for (int j = 0; j < ; j++)
                         ^
prog.cpp:32:10: error: expected primary-expression before ‘)’ token
      if ()
          ^
prog.cpp: In function ‘bool IsPasswordValid(std::string)’:
prog.cpp:65:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < s.length(); i++)
                               ^
prog.cpp:67:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int j = 0; j < alphabet.length(); j++)
                                       ^
stdout
Standard output is empty