error C2109: subscript requires array or pointer type 怎么解决;?
// 写入xml文件相关编码器和解码器关联信息 unicode
bool CDlgSwitch::OnWriteConnEnDeFile(wchar_t* xmlFile , wchar_t* elementArray)
{
if(elementArray == NULL)
return FALSE;
CMarkup* connect = new CMarkup();
size_t nodeNumber = sizeof(elementArray)/sizeof(elementArray[0]);
for(int i = 0; i < nodeNumber; i++)
{
LPCWSTR enIP = (LPCWSTR)(&(elementArray[i][1][0]));
CString enPort = (LPCWSTR)elementArray[i][2][0];
CString enChannel = (LPCWSTR)elementArray[i][3][0];
CString deIP = (LPCWSTR)elementArray[i][4][0];
CString dePort = (LPCWSTR)elementArray[i][5][0];
CString deChannel = (LPCWSTR)elementArray[i][6][0];
CString time = (LPCWSTR)elementArray[i][7][0];
//写入xml文件
connect->AddChildElem(LPCTSTR(_T("MAP")) );
connect->IntoElem();
connect->AddChildElem( LPCTSTR(_T("TYPE")), (LPCTSTR) type);
connect->AddChildElem( LPCTSTR(_T("ENIP")), (LPCTSTR) enIP);
connect->AddChildElem( LPCTSTR(_T("ENPORT")), (LPCTSTR) enPort);
connect->AddChildElem( LPCTSTR(_T("ENCHAN")), (LPCTSTR) enChannel);
connect->AddChildElem( LPCTSTR(_T("EDIP")), (LPCTSTR) deIP);
connect->AddChildElem( LPCTSTR(_T("DEPORT")), (LPCTSTR) dePort);
connect->AddChildElem( LPCTSTR(_T("DECHAN")), (LPCTSTR) deChannel);
connect->AddChildElem( LPCTSTR(_T("TIME")), (LPCTSTR) time);
connect->OutOfElem();
connect->save((LPCTSTR)xmlFile);
}
delete connect;
return TRUE;
}
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(483) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(484) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(485) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(486) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(487) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(488) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(489) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(494) : error C2065: 'type' : undeclared identifier
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(529) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(535) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(542) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(548) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(554) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(560) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(566) : error C2109: subscript requires array or pointer type
g:\project\复件 theresultect (2)\coderconfigtool\dlgswitch.cpp(572) : error C2109: subscript requires array or pointer type