数据模块的问题?

neelee 2002-12-17 11:19:52
我的数据模块中有Imaglist FileOpenDialog FileSaveDialog 等等控件
其中有一个函数使用以下参数

TTlistItem *tsItem, TTreeNode *tvNode

我包含以下头文件


#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Dialogs.hpp>
#include <ExtDlgs.hpp>
#include <ImgList.hpp>
#include <QComCtrls.hpp>

编译就会出错:???

[C++ Error] Unit2.h(18): E2015 Ambiguity between 'TOpenDialog' and 'Dialogs::TOpenDialog'
[C++ Error] Unit2.h(19): E2015 Ambiguity between 'TSaveDialog' and 'Dialogs::TSaveDialog'
[C++ Error] Unit2.h(28): E2015 Ambiguity between 'TImageList' and 'Controls::TImageList'

我把 #include <QComCtrls.hpp> 去掉就可以编译了,可是不能使用
类似 TTlistItem *tsItem, TTreeNode *tvNode 的参数了。

请问怎么处理才可以同时工作???


C++Builder 5 没有以上问题
C++Builder 6 中就会出现上述问题(安装了sp1 sp2 sp3)

...全文
36 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
neelee 2002-12-17
  • 打赏
  • 举报
回复
呵呵,CB5确实没有问题

CB6就编译出错了,难道真的没有办法吗?
yangguo_god 2002-12-17
  • 打赏
  • 举报
回复
TTlistItem *tsItem, TTreeNode *tvNode
应该是TListItem *tsItem,TTreeNode *tvNode吧,
我用的是cb5,没以上问题,不能帮你了

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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