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 a CGContextRef is 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 the  

C ++ static_cast operator.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -