一个简单的线程例子请教
这是VC++技术内幕中的一个例子,下面是线程函数
UNIT computeThreadProc(LPVOID pParam) (此行就是108行)
{
volatile int nTemp;
for (g_Count=0;g_Count<nMaxCount;::InterlockedIncrement((long*)&g_Count)){
for (nTemp=0;nTemp<10000;nTemp++){
}
g_Count=0;
}
return 0;
}
总是提示
error C2146: syntax error : missing ';' before identifier 'computeThreadProc'
F:\ProgressDlg.cpp(108) : error C2501: 'UNIT' : missing storage-class or type specifiers
F:\ProgressDlg.cpp(108) : fatal error C1004: unexpected end of file found
Generating Code...
Error executing cl.exe.
EX001.exe - 3 error(s), 0 warning(s)
不知如何解决?