Using CCArray and CCMutableArray in cocos2d-x 2.0.1

Hi,
I try to init an CCArray withthe following code
CCArray *spaceDusts = CCArray::initWithCapacity;
But i receive an error when compile:
cannot call menber function ‘bool cocos2d::CCArray::initWithCapacity(unsigned int)’ without object
I make a syntax error? or what?
Another thing, in cocos2d-x 0.12.0 version I use the CCMutableArray, but now it’s deprecated in cocos2d-version.
I have this code:
CCMutableArray<CCSprite >
_asteroids ;

What I can use to replace it?

Use the static methods arrayWithCapacity or create a new object by “new CCArray” and then your initWith…. method.

I try to use the foloowing code to initiate a CCArray

CCArray *spaceDusts = CCArray::initWithCapacity(2);

But gives me the error

cannot call menber function ‘bool cocos2d::CCArray::initWithCapacity(unsigned int)’ without object

What I doing wrong? Ths syntax is wrong?

CCArray *spaceDusts = CCArray::arrayWithCapacity(2);

Syntax is ok, but the C*+ semantic is not. Check out a C*+ book