Horje
generate random string in c++ Code Example
generate random string in c++
#include <random>
#include <string>

std::string random_string()
{
     std::string str("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");

     std::random_device rd;
     std::mt19937 generator(rd());

     std::shuffle(str.begin(), str.end(), generator);

     return str.substr(0, 32);    // assumes 32 < number of characters in str         
}




Cpp

Related
life the universe and everything solution c++ Code Example life the universe and everything solution c++ Code Example
bash find into array Code Example bash find into array Code Example
sort vector of strings Code Example sort vector of strings Code Example
rand() c++ Code Example rand() c++ Code Example
creare array con c++ Code Example creare array con c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7