A class to contain structs
Hello,
I want to try and make something like this:
Code:
class FSAD //Fixed/Selectable Analog Data
{
public:
char Name[25];
int nExpected; // size = nExected*2+1
void MakeSec()
{
DataLine *pDataSec;
pDataSec = new DataLine[nExpected*2+1];
}
};
Where the DataLine is:
Code:
struct DataLine
{
char Param[20];
int Label, SFactor, SigBits;
int Bit30, Bit31, Max, Min;
} ;
If not sure if I call the constructor, How can I later access the variables in the array of structs inside the class?
The class is supposed to have two variables (char Name[25], int nExpected) and an array of structs (DataLine). I can't get to the individual variables inside the struct.
I tried using this and the compiler yelled at me:
Code:
Section.pDataSec[i].Param
Ideas?