I ask the cocos2d-x, and how to implement multi-point touch screen function?

I ask the cocos2d-x, and how to implement multi-point touch screen function?

For instance, if you want to deal with 3 touches at most:

void GameScene::ccTouchesEnded(CCSet touches, CCEventpEvent){
CCSetIterator it;
CCTouch *allTouches[4];
int i = 0;
for (it = touches~~>begin ; i < 3 && it != touches~~>end(); *+ it){
allTouches[i*+] = (CCTouch **)**it;
}

Of cause, it only show you how to obtain the 3 touches.
Most of time we would firstly find out touches->count() then we switch to different functions to deal with corresponding muli-point touches.

Is this what you want, detecting and following multiple fingers on the screen at the same time:-

http://www.gmtdev.com/blog/2011/12/06/multi-touch-in-cocos2d-x/