我在dll中建一个很简单的类.如下:
ok.h
class COK
{
public:
BOOL IsOk(void);
}ok.cpp
#include "StdAfx.h"
#include "ok.h"BOOL COK::IsOk(void)
{
return TRUE;
}编译通不过出错信息如下:
error C2143: syntax error : missing ';' before 'tag::id'
'BOOL' : redefinition; typedef cannot be overloaded with any other symbol
see declaration of 'BOOL'
fatal error C1004: unexpected end of file found而这样就可以了.
#include "StdAfx.h"
#include "ok.h";//add ;
BOOL COK::IsOk(void)
{
return TRUE;
}
不知道为什么?