关于VC++的一个连接错误(初学者求解)LINK ERR 2001
错误信息如下,我认为应该是函数返回值的问题
--------------------Configuration: ListView - Win32 Debug--------------------
Linking...
ListViewView.obj : error LNK2001: unresolved external symbol "public: void __thiscall CListViewView::SetCtrlStyle(struct HWND__ *,unsigned long)" (?SetCtrlStyle@CListViewView@@QAEXPAUHWND__@@K@Z)
Debug/ListView.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
关于函数的代码如下
————————————————分割线——————————————————
void CListView::OnViewChange()
{
// TODO: Add your command handler code here
static int nStyleIndex=1;
DWORD style[4]={LVS_REPORT,LVS_ICON,LVS_SMALLICON,LVS_LIST};
CListCtrl& m_ListCtrl=GetListCtrl();
SetCtrlStyle[/color[color=#FF0000]](m_ListCtrl.GetSafeHwnd(),style[nStyleIndex]);
nStyleIndex++;
if(nStyleIndex>3)nStyleIndex=0;
}