How to Replace only Part of the Variable using #define
Posted
by mahesh
on Stack Overflow
See other posts from Stack Overflow
or by mahesh
Published on 2010-04-15T05:38:14Z
Indexed on
2010/04/15
5:43 UTC
Read the original article
Hit count: 180
#define C_TX_ TX_
#define C_RX_ RX_
enum Test
{
C_TX_MAC 0x0100, // Pre-Processor should replace C_TX_ to TX_
C_RX_MAC 0x0101 // But Not Working.
};
int main(int argc, char *argv[])
{
cout << TX_MAC; // HOW TO PRINT ?
cout << RX_MAC; // HOW TO PRINT ?
return true;
}
Please Help. Thanks in Advance
© Stack Overflow or respective owner