有关CCArray和动画的一个问题

我最近开始学习如何创建动画,按照文档来的,但是在CCArray处报了错

CCSpriteFrameCache* cache = CCSpriteFrameCache::sharedSpriteFrameCache();
    cache->addSpriteFramesWithFile("laugh.plist","laugh.png");
    int iframeNum=6;
    CCSpriteFrame * frame=NULL;
    CCArray * frameArray=CCArray::create();
    for(int i=i;i<=iframeNum;i++)
    {
        frame=cache->spriteFrameByName(CCString::createWithFormat("laugh%02d.png",i)->getCString);
        frameArray->addObject(frame);
    }
    CCAnimation * animation=CCAnimation::createWithSpriteFrames(frameArray);
    animation->setLoops(-1);//设置循环次数,-1表示无限循环
    animation->setDelayPerUnit(0.1f);
    CCAnimate * action=CCAnimate::create(animation);
    sprite->runAction(action);


```

下面这一句出错了
CCAnimation * animation=CCAnimation::createWithSpriteFrames(frameArray);



```

出错原因是参数不对
    不存在从 "cocos2d::CCArray *" 转换到 "cocos2d::Vector" 的适当构造函数

求大神讲解啊,本人新手一枚。。在一开始就错了一个不知道是什么原因的错。。完全按照文档来的啊:6:

有人来看看吗,:9:,是什么原因。。。大家应该都是这样处理动画的吧

我也遇到同样的问题

create后 retain一下

:10:你用的 3.X版本吧。就不要用2.X写法了。。。

Vector<SpriteFrame* > cache;

for(int i = 0;i < 10;i++){

char str;
sprintf(str,“XXX%d.png”,i);
cache.pushBack(Spriteframecache::getInstance()->getspriteFrameByName(str));
}

return Animate::create(Animation:: createWithSpriteFrame(cache,1.0f));