• Initializing array of structs
    Hello, I have an array of structs, which I would like to initialize at startup, but to my surprise this gives me a compiler syntax error: I do as follows: typedef volatile struct Timer {...
  • Array initialization inside struct
    Hello, I try compile this code (.c) with --c99 option struct sx { char c; char a[]; }; static struct sx xx = { 1, {[5] = 0} }; and have error error: #146: too many initializer values How...
  • array of structs with fixed content
    Hi you all. I need to creat an LCD based user interface. Therefore , I decided to use a struct for each LCD menu: typedef struct Menu { char lcd_first_line[16]; char lcd_second_line[16]; struct...
  • Extern struct
    Hi all: I am trying to use data from a structure in different modules ( extern struct), with no success. Here's what I am doing: main.c: #include "main.h" struct my_struct new_struct; void...
  • struct and address
    hello every one, I am trying to use bitfield in my project. i want to assign the port address to the byte which i have created using bitfield. /* following is the code i have tried */ typedef...