Есть ли лучший / более быстрый способ создания строки (std или (const) char *), созданной из строки (const char *) и числа (int), например
animation0, animation1, animation2 ...нимация99
чем это?
ПРИМЕЧАНИЕ: не должен использовать std, потому что hasValueForKey принимает const char *
std::stringstream strIter("animation0");
int i = 0;
while (hasValueForKey(strIter.str().c_str())) {
// do some stuff
++i;
strIter.str(std::string());
strIter << "animation" << i;
}
спасибо