Guest User

Untitled

a guest
Jun 19th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. CGContextRef myContext = [[NSGraphicsContext currentContext] graphicsPort];
  2.  
  3. error: invalid conversion from 'void*' to 'CGContext*'
  4.  
  5. CGContextRef myContext = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]);
  6.  
  7. cristi:tmp diciu$ cat test.c
  8. int main()
  9. {
  10. char * t = "test";
  11. void * m = t;
  12. char * g;
  13.  
  14. g=m;
  15.  
  16. }
  17.  
  18. cristi:tmp diciu$ g++ test.c
  19. test.c: In function ‘int main()’:
  20. test.c:7: error: invalid conversion from ‘void*’ to ‘char*’
  21.  
  22. cristi:tmp diciu$ gcc test.c
Add Comment
Please, Sign In to add comment