osx - Xcode 'invalid conversion' when using objective-c++ -
So if I run my program with implementation then it works fine. Just change it. Mm causes this line ...
cgicontextfreave myContext = [[NSGIX syntax currentContax] Graphicsport]; To throw this error ...
Error: 'invalid conversion from zero *' to 'CGContext *'< / Pre>Why does anyone have any idea to change it, or why to fix it? In this case,
void *(of return code - [NSGraphicsContext graphicsPort] void *>) The underlying conversion from aCGContextRefis invalid You can make a conversion explicitly in this way:CGCentextFIRFUS myContext = static_cast & lt; CGContextRef & gt; ([[NSGraphicsContext PresentContacts] Graphicsport) ;; See SO questions for discussion of theC ++
static_castoperator.
Comments
Post a Comment