Below I've presented the declaration, definition and the calling method of a function w.r.t pass by reference:
void getUnpackedMsg (unsigned char &data, unsigned int numberOfBits);
line 278: Shown in RED
void packedMessage :: getUnpackedMsg (unsigned char &emptyArray, unsigned int numberOfBits)
printf ("\nAfter unpacking 0: %d ", emptyArray);
q.getUnpackedMsg (*empty0, 8);
workingA.cpp:278: error: invalid types ‘unsigned char[unsigned int]’ for array subscript
Kindly point me the error here !
By Mistake I have posted this in C forum, It should go to C++ forum. How to inform the moderator now ?