View Single Post
Old 06 June 2014, 13:59   #8
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 758
Can't figure out this:

Code:
#define	CRAP(x) (int)&(((something_t *)0)->x)

field_t fields[] = {
	{"whatever", CRAP(whatever),MORE},
};
gives me "initializer not a constant". Seems to work for gcc....
Cowcat is offline  
 
Page generated in 0.04499 seconds with 11 queries