This is what I am doing now:
#define SIZE 512
#defube SIZE_WIDTH 9
But are there any way to write a preprocessor command to calculate the SIZE_WIDTH from SIZE ? This is what I want to do, but cannot pass compiler:
#define SIZE_WIDTH LOG2(SIZE)
Thanks for any feedback!
#define SIZE 512
#defube SIZE_WIDTH 9
But are there any way to write a preprocessor command to calculate the SIZE_WIDTH from SIZE ? This is what I want to do, but cannot pass compiler:
#define SIZE_WIDTH LOG2(SIZE)
Thanks for any feedback!
Comment