Хочу сделать строку из случайных символов, но функция выводит всего 2 одиннаковых символа каждый раз. В чем дело?

#include <iostream>
#include <fstream>
#include <string>
#include <random>
#include <Windows.h>
#include <time.h>

using namespace std;

const char symbols[] = 
"ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmopqrstuvwxyz01233456789!#@&?";

inline string generate_password(int count) {
    string result;
    srand(time(NULL));
    for (int i = 0; i <= count; i++)
    {
        result = result + symbols[rand()];
    }
    cout << result;
    return result;
}

Ответы (0 шт):