CCNode* node1 = CCNode::create(); node1->setPosition(ccp(100, 200));
CCSprite* sprite1 = CCSprite::create("sprite_image.png"); sprite1->setPosition(ccp(50, 100));This example creates a new CCSprite object with an image file "sprite_image.png". It sets the position of the sprite to (50, 100) and adds it to the scene graph. CCSprite is a subclass of CCNode, and this example uses the same setPosition method to set its position. Package Library: Cocos2d-x.