Link to home
Start Free TrialLog in
Avatar of naseeam
naseeamFlag for United States of America

asked on

what does it mean to dereference array of structures?

struct ConfigConnection
{
  ParameterId metered;     // ParameterId type is "enum"
  ParameterId calibration;
};


// contents of this array are just numbers
const ConfigConnection ParameterGenerator::connections[] =
{
  {ParameterId_GeneratorVoltageAB, ParameterId_CalibrationFactorVoltageAB},
  {ParameterId_GeneratorVoltageBC, ParameterId_CalibrationFactorVoltageBC},
  {ParameterId_GeneratorVoltageCA, ParameterId_CalibrationFactorVoltageCA},
  {ParameterId_GeneratorVoltageAN, ParameterId_CalibrationFactorVoltageAN},
  {ParameterId_GeneratorVoltageBN, ParameterId_CalibrationFactorVoltageBN},
  {ParameterId_GeneratorVoltageCN, ParameterId_CalibrationFactorVoltageCN},
  {ParameterId_GeneratorCurrentA , ParameterId_CalibrationFactorCurrentA},
  {ParameterId_GeneratorCurrentB , ParameterId_CalibrationFactorCurrentB},
  {ParameterId_GeneratorCurrentC , ParameterId_CalibrationFactorCurrentC},
};


for(short i = 0; i < (sizeof(connections)/sizeof(*connections)); ++i)
{
    ...
    ...
}

What does   *connections mean?
ASKER CERTIFIED SOLUTION
Avatar of Zoppo
Zoppo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial