Thanks for continued patience
Does the gcc example automatically pack to 1 byte?
Plus is the gcc platform indepentant, could I use it with VC?
byte alignment with VC
Quote: Original post by traiger
thanks
alittle confused as to how to use that though.
#include <PshPack1.h>
void ReadFile(char *filename)
{
...
}
#include <PopPack.h>
Can't be right perhaps you could provide an example.
#include <PshPack1.h>
struct TGAHeader
{
unsigned char ...
...
...
};
#include <PopPack.h>
and as a side note, this does the same thing as what CustardSlice suggested, the headers just take care of the pushing and popping so you only have to think about which alignment you want.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement