Can someone explain to me what this code means
This is from a tutorial I'm reading
Code:
// byte-align structures
#ifdef _MSC_VER
# pragma pack( push, packing )
# pragma pack( 1 )
# define PACK_STRUCT
#elif defined( __GNUC__ )
# define PACK_STRUCT __attribute__((packed))
#else
# error you must byte-align these structures with the appropriate compiler directives
#endif
I'm not exactly sure what it means...'byte align structures' ?
Is this for like determining an operating system or something?
It would be cool if you could explain what each line means, not just explain what the general purpose is.
Thanks