initializing an array of floats within a structure during declaration.

Hi , I´m having trouble initializing an array of floats within a structure during declaration.

struct CalibParam {                    // Calibration Parameters aX^2 + bX + c
  float a;
  float b;
  float c;  
} ;
struct AnalogSensors {
   CalibParam CalPar[4] ;     // E2P array of structures ex: an.CalPar.b 
   int  SurfTemp;
   // ... snip
   int  BarPres;
   long avgarray[4];
} an = { {0.0 , 5000.0/1024.0 , 0.0 } ,
         {0.0 , 5000.0/1024.0 , 0.0 } ,
         {0.0 , 1.0 , 0.0 },
         {0.0 , 1.0 , 0.0 } };

Gives : error: braces around scalar initializer for type 'int' I´ve tried many things , I´m just missing the concept :~

More brackets! You need a set for each struct or array:

You need brackets for the structure AnalogSensors. Within that you need brackets for the array CalPar. Within that you need brackets for each of the four CalibParams. THEN you put a value for SurfTemp.

struct AnalogSensors {
   CalibParam CalPar[4] ;     // E2P array of structures ex: an.CalPar.b 
   int  SurfTemp;
   // ... snip
   int  BarPres;
   long avgarray[4];
} an = 
{ // AnalogSensors
  { //CalPar array
    {0.0 , 5000.0/1024.0 , 0.0 } ,  // CalibParam CalPar[0]
    {0.0 , 5000.0/1024.0 , 0.0 } ,  // CalibParam CalPar[1]
    {0.0 , 1.0 , 0.0 },                 // CalibParam CalPar[2]
    {0.0 , 1.0 , 0.0 }                  // CalibParam CalPar[3]
  },
  999 // SurfTemp
};

Thank you John for the clear explanation :) .