error C2327!!!

yangkunhenry 2008-07-23 09:40:14
error C2327: 'CRecordset::BOOL' : member from enclosing class is not a type name, static, or enumerator
这个怎么改啊。出现好多类似的错误。
...全文
353 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
xkyx_cn 2008-07-23
  • 打赏
  • 举报
回复
#include <windef.h>
或者
#include <windows.h>
到你的stdafx.h里面

[Quote=引用 2 楼 yangkunhenry 的回复:]
工程中出现的。好多啦,贴不完的。

C/C++ code
BOOL m_bRecordsetDb;
BOOL m_bBOF;
BOOL m_bEOF;
BOOL m_bUpdatable; // Is recordset updatable?
BOOL m_bAppendable;



象这样的返回值是BOOL型的都报错了。
[/Quote]
yangkunhenry 2008-07-23
  • 打赏
  • 举报
回复
谢谢阿荣!
hai040 2008-07-23
  • 打赏
  • 举报
回复
没定义吧
typedef int BOOL
#define TRUE 1
#define FALSE 0

#include <windef.h>
yangkunhenry 2008-07-23
  • 打赏
  • 举报
回复
工程中出现的。好多啦,贴不完的。

BOOL m_bRecordsetDb;
BOOL m_bBOF;
BOOL m_bEOF;
BOOL m_bUpdatable; // Is recordset updatable?
BOOL m_bAppendable;

象这样的返回值是BOOL型的都报错了。
xkyx_cn 2008-07-23
  • 打赏
  • 举报
回复
贴代码
arong1234 2008-07-23
  • 打赏
  • 举报
回复
你怎么创建工程的?

MFC工程中BOOL事缺省定义的,更何况在系统类CRecordset中出错的可能性更低。而且即使类型没有定义,也不会报这个错误。估计你代码新增的部分有地方出大问题了,因此导致一系列错误

是不是还有其他错误信息?问错误的时候不要只贴一个你认为可疑的,不同的错误之间往往有关联性
yangkunhenry 2008-07-23
  • 打赏
  • 举报
回复
哦,解决了。我机器中没有afxdb.h文件.呵呵,谢谢了!
yangkunhenry 2008-07-23
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 xkyx_cn 的回复:]
#include <windef.h>
或者
#include <windows.h>
到你的stdafx.h里面

引用 2 楼 yangkunhenry 的回复:
工程中出现的。好多啦,贴不完的。

C/C++ code
BOOL m_bRecordsetDb;
BOOL m_bBOF;
BOOL m_bEOF;
BOOL m_bUpdatable; // Is recordset updatable?
BOOL m_bAppendable;


象这样的返回值是BOOL型的都报错了。
[/Quote]
还是不行啊。已经包含了:
fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
执行 cl.exe 时出错.好像是我的afxdb.h文件出问题了。完整的错误是

c:\program files\microsoft visual studio\vc98\include\afxdb.h(866) : error C2327: 'CRecordset::BOOL' : member from enclosing class is not a type name, static, or enumerator

3,881

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧