Forum Discussion
Altera_Forum
Honored Contributor
19 years agoarray of struct
struct tbl
{ unsigned int Nr[2][3]; } mytbl = {{0,1,2},{1,2,3}}; This doen't work, but why? For my application mytbl has to be a array (mytl[20]) and it has to be initialized at startup like above.2 Replies
- Altera_Forum
Honored Contributor
Hi asegers,
> This doen't work, but why? Your initializer syntax is not correct ... each struct member needs its own braces ... try: struct tbl { unsigned int Nr[2][3]; } mytbl = {{{0,1,2},{1,2,3}}}; Regards, --Scott - Altera_Forum
Honored Contributor
thanks!