password-generator Code ins't good for much chars. If you want generate password 20.000 Chars, delete line "system("cls")" and "cout << "Your password: " << passx;"