介绍了如何生成随机数,可以基于随机数生成随机字符串:
#include <cstring>
#include <chrono>
#include <random>
#include <iostream>
using namespace std;
string getRandomStr(int strLen)
{
const static char *str =
介绍了如何生成随机数,可以基于随机数生成随机字符串:
#include <cstring>
#include <chrono>
#include <random>
#include <iostream>
using namespace std;
string getRandomStr(int strLen)
{
const static char *str =