Gast
#812054
Hallo,
ich will mit sizeof feststellen, wie groß ein Array ist. Das Array
besteht aus struct:
typedef struct {
uint8_t id,
next,
prev,
parent,
child;
char name[MENU_STRING_LENGTH];
uint8_t type;
uint8_t int_part,
fract_part;
uint32_t max_int;
void ( *fkt_pointer )( void );
} menu_t;
menu_t test[5];
...
sizeof(test);
Ich würde ja nun das Ergebnis "145" ertwarten.
Bis zur Arraygröße 2 (also 2 Einträge) klappt es auch; danach stimmt das
ERgebnis nicht mehr. So kommt schon bei menu_t test[3] als
sizeof-Ergebnis 57 heraus...?
MfG
Chris