Calculation of sizof through macro. Possible?
I need help on calculating sizeof through a macro. I have the folloing layout.
In file "One.h"
And in file "Two.h" I want to calculate as follwing:
typedef uint16_t tTime;
I get the following compiling error:
#define NODE_LENGTH 6
#define TOT_SIZE NODE_LENGTH + sizeof(tTime)
#if (TOT_SIZE > 100)
#error "TOT_SIZE too big."
How can I get pass this? I don't want to 'hard code' the TOT_SIZE.
missing binary operator before '('
Thanks in advance,