Follow Line support

Hey guys, I have been trying to port my Cocos2d Game to Cocos2dx. Where i used to store my touch locations and according to that my sprite will follow the line using motionstreak. here is the code to update the location

updatePosition: position
{
];
}
and i have changed it into c*+
void Chakaram::updatePosition
{
m_pControlPoints = CCArray::create;
m_pControlPoints
>retain;
temp = new CCPoint;
temp~~>setPoint;
m_pControlPoints~~>addObject;
points = CCPointArray::create;
points~~>retain;
points~~>getControlPoints~~>addObjectsFromArray;
points~~>addControlPoint;
}
and this is the code to move the sprite along the line
~~ startMovePlane
{
if {
self.isMoving = YES;
CGPoint target = CGPointValue];
float angle = CC_RADIANS_TO_DEGREES);
angle*= 90;
angle = 1;
self.rotation = angle;
play =,
,
nil]];
}
else {
self.isMoving = NO;
}
}
C++ code
void Chakaram::startMovePlane
{
CCLog;
if > 0) {
CCLog;
this
>isMoving = true;
//CCLog;
//points~~>getControlPointAtIndex;
points~~>retain;
CCPoint
target = new CCPoint;
target~~>setPoint(points~~>getPositionX,points~~>getPositionY());

CCLog(“TEST2”);

//m_pControlPoints = CCArray::create();
//CCPoint *temp = new CCPoint();
//temp~~>setPoint;
//CCPoint tar = new CCPoint;
//tar~~>
//CCLog;
//CCLog;
CCFiniteTimeAction action = CCCardinalSplineTo::create;
//this~~>runAction;
CCLog;
CCPoint difference = ccpSub,this~~>getPosition);
double angle = 1 * * 180 / M_PI + 90) + 180;
//CCCallFuncND::actionWithTarget, data)));
//CCLog,&difference
>getPositionY);
//CCMoveTo
move = CCMoveTo::create, ccp) / this~~>velocity ,ccp);
CCRotateTo
rotate = CCRotateTo::create;
CCCallFunc *cal = CCCallFunc::create);
this~~>runAction(rotate);
CCLog(“TEST4”);
this~~>runAction);
CCLog;
//this~~>runAction(action);
CCLog(“Action 2”);

//[self runAction:[CCRotateTo actionWithDuration:0.3 angle:angle]];

}
else {

this->isMoving = false;
}
}

i have changed the name linePathPosition to m_pControlPoints for cocos2dx. Help me how to convert the Startmoving method for cocos2dx.

Regards
K.Karthik
Just Games