PDA

View Full Version : Creating a Random String in c++ 2011



Vuhelper
06-14-2011, 09:14 PM
1.
std::string bucket = "abcdefghijklmnopqrstuvwxyz";
2.
std::string uuid;
3.
for ( ... ) {
4.
uuid += bucket[rand() % bucket.size()];
5.
}