Error using CCSprite with CCSpriteBatchNode

I try to create a sprite, using the following code:

CCSpriteBatchNode* sheet = (CCSpriteBatchNode*)getChildByTag(kTagSpriteManager);

CCSprite *sprite = CCSprite::spriteWithBatchNode(sheet, CCRectMake(32 * idx,32 * idy,32,32));

But the second line gives me an error, why is the correct way to use spriteWithBatchNode?