What's the purpose of the 1+1, 1+2, etc.. why not just do 2,3,4......??Code:enum tx_op { P_TX = 1, PU_TX = 1 + 1, RT_TX = 1 + 2, GET_TX = 1 + 3, PUT_TX = 1 + 4, };
What's the purpose of the 1+1, 1+2, etc.. why not just do 2,3,4......??Code:enum tx_op { P_TX = 1, PU_TX = 1 + 1, RT_TX = 1 + 2, GET_TX = 1 + 3, PUT_TX = 1 + 4, };
Yeah, it looks like cruft. It could have been written as:
Code:enum tx_op { P_TX = 1, PU_TX, RT_TX, GET_TX, PUT_TX, };
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)