如下代码,连接时出现错误.检查不出原因,请高手帮忙.#include <afx.h>
class CDividedByZero
{
};
float Divide( int a, int b )
{
ASSERT( b!=0 );
if(  b==0 )
throw new CDividedByZero();
return (float)a/b;
}
void main()
{
try
{
float c=Divide( 100, 20 );
printf("c=%f\r\n", c );
float d = Divide( 100, 0 );
printf("d=%f\r\n", d );
}
catch( CDividedByZero *e )
{
delete e;
printf("divided by 0!\r\n");
}
}
以下是错误信息:Deleting intermediate files and output files for project 'Erro - Win32 Debug'.
--------------------Configuration: Erro - Win32 Debug--------------------
Compiling...
Erro.cpp
Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/Erro.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.Erro.exe - 3 error(s), 0 warning(s)