please help me

CCArray frames = CCArray::create;
for {
CCString
str = CCString::createWithFormat(“a%04d.png”, i);

CCLog(str~~>getCString);
frames~~>addObject(CCSpriteFrameCache::sharedSpriteFrameCache()>spriteFrameByName));
}
CCAnimation animation = CCAnimation::create;
CCAnimate
a = CCAnimate::create;
this
>runAction(a);

Always crash here with:
Assertion failed!
Expression:dynami_cast<CCAnimationFrame*>(*arr)

how can i fix this?