avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?


From: Royce Pereira
Subject: Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?
Date: Sun, 18 Sep 2005 09:27:55 +0530
User-agent: Opera M2/8.02 (Win32, build 7680)

Hi,

but now I am having to initialize an array of structures, and I am getting lost :-/ Here is my declaration :


ui.h
----
//data type for one engine parameter
struct param {
                char    desc[11];       //parameter name ("Engine Speed", "Coolant 
Temp",...)
                char    unit[4];        //unit to be used ('%', "RPM", "°C", 
"Bar" ...)
char format[6]; //printf format string: how to format the number on the LCD
};


//table containing the definition for all engine parameters
extern const struct param param_list[30];


What's the syntax to initialize my "param" array above ?!

I havn't used arrays of structures yet, but i believe
You have to create an array of pointers to the structures.

--Royce.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]