Iterating through CCString

Hello guys.

I’m a newbie coming from pure Objective-C Cocos2D framework.Now i need to do a fairly simple task.

Need to take each letter from NSString and create a dynamic file name based on each letter. On Objective-C I would iterate through each letter and user the [NSString stringWithFormat "%“]. Or something similar.
Now… how can this be ported into C++? Here I got char * or std:string… How can I generate new strings using each char*? Which function use to do that maybe something like”myfileName%c"?

Thanks a lot.

Have a look at http://stackoverflow.com/questions/1315041/how-can-i-iterate-through-a-string-and-also-know-the-index-current-position

std::string allChars (“AllChars”);
std::string myFileName(“myFileName”);
for (int i=0; i<allChars.length(); ++i)
{
std::string newFileName = myFileName+allChars[i];
// DO what you need
}