Hi,
I have a structure defined in my header file as follows:
struct TestInformation
{
int TestPointer; // pointer to the selected test
long TestPointerValue; // the value contained within the pointer
long TestSize; // the size of a test
char *TestText; // the text contained within a test
};
In my source file, I have a function in which I want to declare an array of those structures, to be passed to another function to be filled and returned:
struct TestInformation *BoardTests[0x100];
// Get the file into an internal structure
iError = TSL1_LoadTSLInternal(TSL_TEMP_FILE, BoardTests, iGlbNumTests);
...
...
...
return iError;
Now, my declaration of TSL1_LoadTSLInternal looks like this:
int TSL1_LoadTSLInternal (char *filename, struct TestInformation *BoardTests[0x100], int iGlbNumTests)
So, in that function i'd like to be able to index into the structure:
BoardTests[i].TestPointer
but I am getting a compilation error:
C:\Projects\uMaster3xxxC++\IntelDriver\TSL1\TSL1.cpp(273) : error C2228: left of '.TestPointer' must have class/struct/union type
Can anyone help? I know this is possible because I've done something similar with a char array, I just can't seem to get this one right.
Any help greatly appreciated.