TDirectory mkdir, inside a loop

Hi, I would like to ask about the function mkdir, I would like to use it inside a loop, is there a way to use as an argument a string, and not the name of the folder?
TDirectory *ZZ = cr1->mkdir(“ZZ”);
I 've tried using
TString name =“ZZ”;
TDirectory *ZZ = cr1->mkdir(name.c_str()); but does not work

Thanks a lot!

TString name =“ZZ”;
TDirectory *ZZ = cr1->mkdir(name.Data());

Thanks couet, that solved my issue!