i guys i have a struct defined as below
typedef struct s_myStruct
{
uint8 A;
uint8 B;
uint8 C;
uint8 D;
uint32 E;
uint16 F;
} t_myStruct;
typedef struct s_myStruct
{
uint8 A;
uint8 B;
uint8 C;
uint8 D;
uint32 E;
uint16 F;
} t_myStruct;
To copy to clipboard, switch view to plain text mode
by the way i have it defined somewhere these uint stuff as
typedef char int8;
typedef unsigned char uint8;
typedef short int int16;
typedef long int int32;
typedef unsigned short int uint16;
typedef unsigned long int uint32;
typedef char int8;
typedef unsigned char uint8;
typedef short int int16;
typedef long int int32;
typedef unsigned short int uint16;
typedef unsigned long int uint32;
To copy to clipboard, switch view to plain text mode
Now, my question is that when i do a
sizeof (t_myStruct)
sizeof (t_myStruct)
To copy to clipboard, switch view to plain text mode
it will come back as 12 , I was expecting 10.
what did i do wrong please guide me ...
baray98
Bookmarks