阅读背景:

在C ++中读取不同格式的数据

来源:互联网 

I'm creating my first real binary parser (a tiff reader) and have a question regarding how to allocate memory. I want to create a struct within my TiffSpec class for the IFD entries. These entries will always be 12 bytes, but depending upon the type specified in that particular entry, the values at the end could be of different types (or maybe just an address to another location in the file). What would be the best way to go about casting this sort of data? The smallest size memory I believe I would be dealing with would be 1 byte.I'm creating my first real binary parser (a tif




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: