Let's start with the code and the error.
#define BitMap_getMask(range) (((~(unsigned int)0>>(31-range.b+range.a))<<range.a))
#define BitMap_get(x, range) (x & BitMap_getMask(range))
#define awesome (range){4,6}
...................
printf("%08x\n", BitMap_get(0xEEEEEEEE, awesome));
Now the error from the compiler. Line 29, the line with the printf.
error: macro "BitMap_getMask" passed 2 arguments, but takes just 1
error: 'BitMap_getMask' undeclared (first use in this function)
I'm working on a small library which will help me with bitwise operations. When trying to use a macro within another macro I am getting this error.
#define awesome (range){4,6}what is it supposed to do?