moving layer on the iphone screen

moving layer on the iphone screen
0.0 0


I created set of cards on the screen. Now I want to move the layer.I written the code like :

void GamePlay::ccTouchBegin(cocos2d::CCSet* touches,cocos2d::CCEvent* event,cocos2d::CCLayer* layer)
cocos2d::CCTouch* touch=(cocos2d::CCTouch*)(touches~~>anyObject);
cocos2d::CCPoint location=touch~~>locationInView(touch~~>view);
int offX=location.x;
int offY=location.y;
float length=sqrtf;
float velocity=480/1;
float realMoveDuration=length/velocity;
cocos2d::CCPoint Dest=ccp;

and also I did this->setIsTouchEnabled(true); in init() function, but it is not working.
please help me,

I am the beginner in cocos2d-x and c++.


pMyLayer->setPosition( ccp(x,y) );


Move a layer of those cards?
I am sorry, I don’t catch it.