Problem using CCPointer [error C2039: 'retain' : is not a member of]

Hi everybody,

I am trying to use the smart pointer specification at the Cocos2d-x extensions (for C++). When I try to declare a pointer in my header as:
CCPointer pPlayerData;

and then I initialize it on my .cpp body,
pPlayerData = CCPointer (new PlayerData(PLAYER_ONE));

all the places where I use the smart pointer style pPlayerData->DoSomething();
are apparently fine, but I’ve got the error:

error C2039: ‘retain’ : is not a member of PlayerData

I am using Windows 7 and VS2010. I also have tried to find some information about the extensions with no lucky.

Any thoughts about what I am doing wrong here? (thanks in advance)

Hey all,

I just will reply to myself as I have found the solution to this error (just in case someone have the same problem).

Basically CCPointer is a class to be used with Cocos2D objects. You can instantiate a smart pointer of CCImage for example: CCPointer pTempImage (new CCImage());

Of course if you want to use a smart pointer in some of your own classes, you can use the STD auto_ptr smart pointer for example: auto_ptr pPlayerData;

Anyway, that will solve the problem I just exposed on my first post :P.