M
moose
Can someone explain why the following will not work,
#define MYSTRUCT(name,size) struct my_struct_ ## name {
unsigned char name ## _array[ size ] ;
} ;
MYSTRUCT( foo , 10 )
The error is because the size doesnt appear to be known at compile time
to create the array but why not ? this is a macro not a function.
Any comments welcome
#define MYSTRUCT(name,size) struct my_struct_ ## name {
unsigned char name ## _array[ size ] ;
} ;
MYSTRUCT( foo , 10 )
The error is because the size doesnt appear to be known at compile time
to create the array but why not ? this is a macro not a function.
Any comments welcome