What would you suggest as the fastest or best way to parse a fixed length message in c++ which has fields defined like
field = 'type', length = 2, type = 'alphanumeric'
field = 'length', length = 2, type = 'binary' (edit:length = 2 means 16 bit)
...
...
and so on
I read about making a struct and then using reinterpret_cast but im not sure how to use that or if there is any better method.
By parsing, i mean extracting human readable format like 'Type = X', 'Length = 15' etc