How to use CCARRAY_FOREACH

Hi, everyone.

I try to use CCARRAY_FOREACH this way.

since ‘spiders’ is a CCArray and ‘spider’ is a CCSprite

CCARRAY_FOREACH(spiders, spider)
{
CCLog(“do nothing”);
}

But I receive a compilation error:
Assigning to ‘cocos2d:CCSprite ’ from incompatible type ’cocos2d::CCObject

Why this is not working?

I use it this way in cocos2d-iphone and works.

In CCArray elements stored as CCObject*, so you need cast your element to your type (CCSprite*).

Ok, i got it, thanks for help.