See the example to understand
int rnd = rand() %10;
string Folder = "c://foldername";
string final_name = Folder + rnd; // here the target
/* I want the result like that (random folder name)
foldername5
foldername10
foldername3
foldername20
foldername17
*/
In c++ you use stringstream to convert integers to strings.