I am a beginner in C and During Programming I have found this code about bitwise addition
#define WORD_FROM_BUF(WRD) ((((unsigned char *)(WRD))[0]<<8)|((unsigned char *)(WRD))[1])
I have tried to modify this code to this form
#define WORD_FROM_BUF(WRD) (((unsigned char *)(WRD[0])<<8)|((unsigned char *)(WRD[1]))
EDIT My problem is similar to these 2 questions C macros and use of arguments in parentheses- by Palec
Can we remove parentheses around arguments in C macros definitions?- by Palec
Thanks everyone for your explanations