newbe macro preprocessor question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm trying to do this:

#define mypoint	1, 2
#define myDISP(mypointer,mybyte,mybit) mypointer[mybyte] = mypointer[mybyte] | (0x01<<mybit)
unsigned char testpointer[20];
myDISP(testpointer,mypoint);

and I get this error:

macro "myDISP" requires 3 arguments, but only 2 given

I'm not understanding why "mypoint" definition isn't expanded in myDISP invocation ?

Any help really appreciated :)
Andrea

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux