Possible Duplicate:
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
I'm trying to parse ID3v2 tags, at least get important data like artist, title, and album, but I'm having trouble setting up the necessary structures.
struct ID3v2_frame{
char id[4];
unsigned int size;
bool flags[2];
};
ID3v2_frame frame;
cout<<sizeof(frame)<<endl;
It's a problem with how I'm setting up a 4 byte int I think. When I output sizeof(frame) it outputs 12, my intended output is 10. I'm running on a 64 bit linux machine.