i have an problem, i am writing a header file, which depending on the Sizes of the c standard datatypes, defines different Structs and Unions. I would need something like this:
#if sizeof(int) == 4
typedef struct {
int i;
} test;
#else
typedef struct {
long i;
} test;
#endif
sadly this doesnt work.
Does somebody know, how i can do this?
Thanks for your help.
#if INT_MAX == 2147483647... remember to#include <limits.h>