daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Jan 16th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. typedef struct {
  2.   int member;
  3.   // [...]
  4. } Record;
  5.  
  6. class Data {
  7.   Record * records;
  8.   // [...]
  9.   static int method(const void * ptr);
  10. };
  11.    
  12. int Data::method(const void * ptr) {
  13.     Record * rec_1 = (Record *) ptr;
  14.     return rec_1->member;
  15. }
  16.    
  17. int Data::method(const void * ptr) {
  18.     __typeof__(records) * rec_1 = (__typeof__(records) *) ptr;
  19.     return rec_1->member;
  20. }
  21.    
  22. error: request for member ‘member’ in ‘* rec_1’, which is of non-class type ‘Record*’
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top