定义结构体
typedef struct tagDeviceListFileStruct
{
char DeviceName[20];
DWORD DeviceType;
int DeviceDataWidth;
DWORD DeviceID;
DWORD DeviceManuID;
char DeviceManuICO[20];
char DeviceManuName[20];
DWORD OperationID;
DWORD DeviceSize;
DWORD DevicePackage;
int DevicePinCount;
float DeviceVCC;
float DeviceVPP;
DWORD DeviceAdapter;
char Datasheet[20];
char DeviceNote[100];
}DeviceListFileStruct,*LPDeviceListFileStruct;数组模板
CArray<DeviceListFileStruct*,DeviceListFileStruct*>  m_arDeviceList;在模式对话框调用父窗口变量m_arDeviceList,parent为父窗口指针
int DeviceCount;
CString DeviceManuName,DeviceName; DeviceCount = parent->m_arDeviceList.GetSize();
for (int n=0;n<DeviceCount;n++)
{
DeviceManuName = parent->m_arDeviceList.GetAt[n]->DeviceManuName;
m_cManuList.AddString(DeviceManuName);
DeviceName = parent->m_arDeviceList.GetAt[n]->DeviceName;
m_cDeviceList.AddString(DeviceName);
}编译出错
: error C2109: subscript requires array or pointer type
 : error C2227: left of '->DeviceManuName' must point to class/struct/union
 : error C2109: subscript requires array or pointer type
 : error C2227: left of '->DeviceName' must point to class/struct/union求解