请教:关于CString 数组的问题。谢谢
代码大概如下吧先定义一个全局函数:CString str[];
然后函数代码大致如下:
void savedata( DAB_SERVICE_INFO *service ,int size )
{
for (int i=0;i<size;i++)
{
CString str_ServiceLabel;
str_ServiceLabel = service->ServiceLabel;
str_ServiceLabel.Format(L"%s\r\n",str_ServiceLabel );
InfoLabel[i] = str_ServiceLabel; /*error LNK2001: 无法解析的外部符号 "class ATL::CStringT<wchar_t,class //StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > * InfoLabel" (?InfoLabel@@3PAV?//$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@A)
Si_Offset.exe : fatal error LNK1120: 1 个无法解析的外部命令*/
service++;
}
}
以上是错误,那位高手告诉我为什么会这样啊。我想把service->ServiceLabel的参数保存在str[]中,请问该怎么办,谢谢。