B
Bryan Feeney
This structure is, according to sizeof, 3 bytes long, which makes sense
struct test
{ char text[3];
};
This structure is, according to sizeof, 4 bytes long, which also makes sense
struct test
{ int number;
};
This structure is, according to sizeof, 8 bytes long, which is confusing the
hell out of me!
struct test
{ char text[3];
int number;
};
Where is the extra byte coming from? It's not something I need to know, but
I'd like to know what's going on. I'm using GCC3 on Windows via MinGW as
supplied by the Bloodshed Dev-C++ IDE (verson 4.9.8.0).
Thanks in advance
struct test
{ char text[3];
};
This structure is, according to sizeof, 4 bytes long, which also makes sense
struct test
{ int number;
};
This structure is, according to sizeof, 8 bytes long, which is confusing the
hell out of me!
struct test
{ char text[3];
int number;
};
Where is the extra byte coming from? It's not something I need to know, but
I'd like to know what's going on. I'm using GCC3 on Windows via MinGW as
supplied by the Bloodshed Dev-C++ IDE (verson 4.9.8.0).
Thanks in advance