My question might be very basic but I really do not know how to do this...
I need to create a structure, something that looks like a protocol (a data packet actually)...this packet consists of 3 parts header, data and trailer...
The header has 3 offset bytes, 64 bytes of forwarding label, and so on...then starts the data portion followed by the trailer portion each consisting of their own set of information and hence variable bytes...how do I assign memory in terms of bytes instead of a data-type...I do not want to fix a byte with a data-type (eg: I do not want to use char to assign 1 byte, int for 2 n so on)....the answer I guess to this problem is using templates...but I do not know how to assign byte-wise memory...
Can someone please let me know...