关于时间函数的问题,请教各位高手
程序如下:
#include <stdio.h>
#include <math.h>
#include "Afxwin.h"
void function()
{
unsigned int i,j;
double y;
for(i=0;i<1000;i++)
for(j=0;j<1000;j++)
y=double(i+j/i);
}
void main()
{ CTime t1,t2;
t1=CTime::GetCurrentTime();
int tpstart;
int timeuse;
tpstart=t1.GetSecond();
function();
t2=CTime::GetCurrentTime();
timeuse=tpstart-t2.GetSecond();
printf("Used Time:%d\n",timeuse);
}
build时出现link错误:
NAFXCWD.LIB(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
NAFXCWD.LIB(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/test.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
在project/setting/link的library module中加入NAFXCWD.LIB后错误仍然存在,不知道如何处理,请各位高手解答一下!
谢谢!