I just switched my code from Objective-C to Objective-C++. Everything goes swimmingly except for two lines.
NSString * text1=[[NSString stringWithFormat:@"%.2f",ymax] UTF8String];
This line complains that
error: cannot convert 'const char*' to 'NSString*' in initialization
The second error related to the first is from the line:
CGContextShowTextAtPoint(context, 2, 8, text1, strlen(text1));
It complains that
error: cannot convert 'NSString*' to 'const char*' for argument '1' to 'size_t strlen(const char*)'
Is there something I missed in the differences between ObjC and ObjC++?