cocos2dx 2.1.1 runtime error

CCAnimation animation= animationWithSingleFrames;
CCAnimation
HelloWorld::animationWithSingleFrames(char name,int count,float delay)
{
CCSpriteFrameCache
cache = CCSpriteFrameCache::sharedSpriteFrameCache();
CCArray* animFrames = CCArray::createWithCapacity(count);
char str[80];
for(int k = 0; k < count; k++)
{
sprintf(str, “sd.png”, name, (k));
CCSpriteFrame frame = cache~~>spriteFrameByName;
animFrames~~>addObject;
}
CCAnimation
animation = CCAnimation::create(animFrames, delay);//<——here
return animation;
}

why?

teilala yos wrote:

CCAnimation animation= animationWithSingleFrames;
>
CCAnimation
HelloWorld::animationWithSingleFrames(char name,int count,float delay)
{
CCSpriteFrameCache
cache = CCSpriteFrameCache::sharedSpriteFrameCache();
CCArray* animFrames = CCArray::createWithCapacity(count);
char str[80];
for(int k = 0; k < count; k++)
{
sprintf(str, “sd.png”, name, (k));
CCSpriteFrame frame = cache~~>spriteFrameByName;
animFrames~~>addObject;
}
CCAnimation
animation = CCAnimation::create(animFrames, delay);//<——here
return animation;
}
>
>
why?

i know
CCAnimation animation = CCAnimation::create;
change to
CCAnimation
animation = CCAnimation::createWithSpriteFrames(animFrames, delay);