cocos2d::CCSpriteFrameCache::spriteFrameByName no matching function found

am geting an error on the following line

frames->addObject(CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(frame->getCString));

the error shown is

Multiple markers at this line
    - candidate is:
    - no matching function for call to 'cocos2d::CCSpriteFrameCache::spriteFrameByName()'

The code is as follows

CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("moles.plist");

mole = CCSprite::createWithSpriteFrameName("b0011.png");

and

void HelloWorld::ccTouchesBegan(cocos2d::CCSet *pTouches, cocos2d::CCEvent *pEvent)
{
    mole->stopAllActions();

    CCArray *frames = CCArray::create();
    for(int i=1; i<=11 ;i++) {
        CCString *frame= CCString::createWithFormat("b%04d.png", i);
        frames->addObject(CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(frame->getCString));
    }
    mole->runAction(CCAnimate::create(CCAnimation::create(frames,.15)));
}

Anyone know what is the error?

how about “getCString()”

Meril K Abraham wrote:

am geting an error on the following line
[…]
>
the error shown is
>
[…]
>
The code is as follows
[…]
>
and
>
[…]
>
Anyone know what is the error?

@season lee :
hehe… thanks for that… i didnt check that…
it worked…

Thanks, it’s helpful. I missed too, put the “()”.