I'm trying to compile my C++ program:

#include <string>
#include <vector>
#include <random>
#include <stdexcept>

using namespace std;

class PasswordOptions {
public:
    virtual bool useLowercase() const = 0;
    virtual bool useUppercase() const = 0;
    virtual bool useDigits() const = 0;
    virtual bool useSpecialChars() const = 0;
    virtual size_t getPasswordLength() const = 0;
};

class PasswordFactory {
public:
    virtual string generatePassword() const = 0;
};

class BasePasswordOptions : public PasswordOptions {
private:
    bool includeLowercase;
    bool includeUppercase;
    bool includeDigits;
    bool includeSpecialChars;
    size_t length;

public:
    BasePasswordOptions(bool lower, bool upper, bool digits, bool special, size_t len)
        : includeLowercase(lower),
          includeUppercase(upper),
          includeDigits(digits),
          includeSpecialChars(special),
          length(len) {}

    bool useLowercase() const override { return includeLowercase; }
    bool useUppercase() const override { return includeUppercase; }
    bool useDigits() const override { return includeDigits; }
    bool useSpecialChars() const override { return includeSpecialChars; }
    size_t getPasswordLength() const override { return length; }
};

class ConcretePasswordFactory : public PasswordFactory {
private:
    PasswordOptions const &options;

    char randomChar(const string &category) const {
        static mt19937 rng(random_device{}());
        uniform_int_distribution<> dist(0, category.length() - 1);
        return category[dist(rng)];
    }

public:
    ConcretePasswordFactory(const PasswordOptions &opts) : options(opts) {}

    string generatePassword() const override {
        string allowedChars;
        if (options.useLowercase()) allowedChars += "abcdefghijklmnopqrstuvwxyz";
        if (options.useUppercase()) allowedChars += "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        if (options.useDigits()) allowedChars += "0123456789";
        if (options.useSpecialChars()) allowedChars += "!@#$%^&*()_-+=<>?";

        if (allowedChars.empty()) throw runtime_error("No characters are allowed for password generation");
        
        string password;
        for (size_t i = 0; i < options.getPasswordLength(); ++i) {
            password += randomChar(allowedChars);
        }
        return password;
    }
};

class ICommand {
public:
    virtual void execute() = 0;
};

class PasswordGeneratorCommand : public ICommand {
private:
    const PasswordFactory &factory;
    size_t numberOfPasswords;
    vector<string> &passwords;

public:
    PasswordGeneratorCommand(const PasswordFactory &f, size_t numPasswords, vector<string> &p)
        : factory(f), numberOfPasswords(numPasswords), passwords(p) {}

    void execute() override {
        try {
            for (size_t i = 0; i < numberOfPasswords; ++i) {
                passwords.push_back(factory.generatePassword());
            }
        } catch (const exception &e) {
            throw;
        }
    }
};

class PasswordStrengthChecker {
public:
    static bool isPasswordStrong(const string &password) {
        size_t score = 0;
        for (char ch : password) {
            if (islower(ch)) score += 1;
            else if (isupper(ch)) score += 2;
            else if (isdigit(ch)) score += 3;
            else score += 5;
        }
        return score > 10;
    }
};

// Функция для получения пользовательского ввода параметров генерации паролей
BasePasswordOptions promptPasswordOptions() {
    bool useLower, useUpper, useDigits, useSpecial;
    size_t length;
    
    cout << "Использовать строчные буквы? (1 - да, 0 - нет): ";
    cin >> useLower;
    
    cout << "Использовать заглавные буквы? (1 - да, 0 - нет): ";
    cin >> useUpper;
    
    cout << "Использовать цифры? (1 - да, 0 - нет): ";
    cin >> useDigits;
    
    cout << "Использовать спецсимволы? (1 - да, 0 - нет): ";
    cin >> useSpecial;
    
    cout << "Длина пароля: ";
    cin >> length;
    
    return BasePasswordOptions(useLower, useUpper, useDigits, useSpecial, length);
}

int main() {
    while (true) { // Цикл для пользовательского интерфейса консоли
        try {
            cout << "Генератор паролей\n";
            
            BasePasswordOptions options = promptPasswordOptions();
            ConcretePasswordFactory factory(options);
            
            size_t numPasswords;
            cout << "Сколько паролей сгенерировать?: ";
            cin >> numPasswords;
            
            if (numPasswords <= 0) {
                throw runtime_error("Количество паролей должно быть больше нуля.");
            }
            
            vector<string> passwords;
            PasswordGeneratorCommand command(factory, numPasswords, passwords);
            
            command.execute();
            
            for (const auto &password : passwords) {
                cout << "Сгенерированный пароль: " << password;
                if (PasswordStrengthChecker::isPasswordStrong(password)) {
                    cout << " (Надежный)";
                } else {
                    cout << " (Не надежный)";
                }
                cout << endl;
            }
            
            cout << "\nХотите сгенерировать еще пароли? (1 - да, 0 - нет): ";
            bool loop;
            cin >> loop;
            if (!loop) break;
        } catch (const exception& e) {
            cerr << "Ошибка: " << e.what() << endl;
            // Очищаем cin, чтобы выйти из потенциальных ошибок потока ввода
            cin.clear();
            cin.ignore(numeric_limits<streamsize>::max(), '\n');
        }
    }

    return 0;
}

But I get this errors:
main.cpp: In function 'BasePasswordOptions promptPasswordOptions()':
main.cpp:122:5: error: 'cout' was not declared in this scope
     cout << "РСЃРїРѕР»СЊР·РѕРІР°С‚СЊ СЃС‚СЂРѕС‡РЅС‹Рµ Р±СѓРєРІС‹? (1 - РґР°, 0 - РЅРµС‚): ";
     ^~~~
main.cpp:123:5: error: 'cin' was not declared in this scope
     cin >> useLower;
     ^~~
main.cpp: In function 'int main()':
main.cpp:143:13: error: 'cout' was not declared in this scope
             cout << "Р“РµРЅРµСЂР°С‚РѕСЂ РїР°СЂРѕР»РµР№\n";
             ^~~~
main.cpp:150:13: error: 'cin' was not declared in this scope
             cin >> numPasswords;
             ^~~
main.cpp:168:25: error: 'endl' was not declared in this scope
                 cout << endl;
                         ^~~~
main.cpp:176:13: error: 'cerr' was not declared in this scope
             cerr << "РћС€РёР±РєР°: " << e.what() << endl;
             ^~~~
main.cpp:176:53: error: 'endl' was not declared in this scope
             cerr << "РћС€РёР±РєР°: " << e.what() << endl;
                                                     ^~~~
main.cpp:178:13: error: 'cin' was not declared in this scope
             cin.clear();
             ^~~

Why compiler shows this error? I used namespace std at begin. Please tell what I can do