Is there code to open up the iTunes App Store and rate the app from within the game?

I can’t seem to find any mention of such code where I can put in my game so that it will open up the iTunes App Store and let user rate the app. Anyone has links to such code?

You can do this by opening a proper url. There is currently no build-in solution to open an url from c++ code (check http://www.cocos2d-x.org/boards/6/topics/11290?r=29092) but it’s quite easy to implement this on iOS. You will need to use some objective-c code to do this:

void openURL(const char* url)
{
    NSString *msg = [NSString stringWithCString:url encoding:NSASCIIStringEncoding];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:msg]];
}