naseeam
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::connec tions[] =
{
{ParameterId_GeneratorVolt ageAB, ParameterId_CalibrationFac torVoltage AB},
{ParameterId_GeneratorVolt ageBC, ParameterId_CalibrationFac torVoltage BC},
{ParameterId_GeneratorVolt ageCA, ParameterId_CalibrationFac torVoltage CA},
{ParameterId_GeneratorVolt ageAN, ParameterId_CalibrationFac torVoltage AN},
{ParameterId_GeneratorVolt ageBN, ParameterId_CalibrationFac torVoltage BN},
{ParameterId_GeneratorVolt ageCN, ParameterId_CalibrationFac torVoltage CN},
{ParameterId_GeneratorCurr entA , ParameterId_CalibrationFac torCurrent A},
{ParameterId_GeneratorCurr entB , ParameterId_CalibrationFac torCurrent B},
{ParameterId_GeneratorCurr entC , ParameterId_CalibrationFac torCurrent C},
};
for(short i = 0; i < (sizeof(connections)/sizeo f(*connect ions)); ++i)
{
...
...
}
What does *connections mean?
{
ParameterId metered; // ParameterId type is "enum"
ParameterId calibration;
};
// contents of this array are just numbers
const ConfigConnection ParameterGenerator::connec
{
{ParameterId_GeneratorVolt
{ParameterId_GeneratorVolt
{ParameterId_GeneratorVolt
{ParameterId_GeneratorVolt
{ParameterId_GeneratorVolt
{ParameterId_GeneratorVolt
{ParameterId_GeneratorCurr
{ParameterId_GeneratorCurr
{ParameterId_GeneratorCurr
};
for(short i = 0; i < (sizeof(connections)/sizeo
{
...
...
}
What does *connections mean?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.