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:Code:typedef uint16_t tTime;
I get the following compiling error:Code:#include "One.h" #define NODE_LENGTH 6 #define TOT_SIZE NODE_LENGTH + sizeof(tTime) #if (TOT_SIZE > 100) #error "TOT_SIZE too big." #endif
How can I get pass this? I don't want to 'hard code' the TOT_SIZE.Code:missing binary operator before '('
Thanks in advance,