找回密码
 立即注册
收起左侧

求帮忙

3
回复
4267
查看
[复制链接]
累计签到:45 天
连续签到:1 天
来源: 2015-5-11 17:21:55 显示全部楼层 |阅读模式
我有两个窗口我分别显示每个窗口都必须要把对应的头文件写在前面,不然报错。。。比如我要显示CController的窗口就必须先写成
#include "controller111.h"#include "detector222.h"窗口可以显示出来
如果写成
#include "detector222.h"#include "controller111.h"
就报错求帮忙啊啊啊





本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

累计签到:45 天
连续签到:1 天
2015-5-11 17:24:26 显示全部楼层
反过来  要显示detector窗口就必须写成
#include "detector222.h"
#include "controller111.h"
窗口可以显示
如果写成
#include "controller111.h"
#include "detector222.h"
就报错
G:\Controller\controller\main.cpp:17: error: 'CDetector' was not declared in this scope
    CDetector f;
    ^
G:\Controller\controller\main.cpp:18: error: 'f' was not declared in this scope
    f.show();
    ^
回复 支持 反对

使用道具 举报

累计签到:45 天
连续签到:1 天
2015-5-11 17:35:58 显示全部楼层
求帮我分析一下哪个环节可能出问题,,,,,,,,
回复 支持 反对

使用道具 举报

累计签到:45 天
连续签到:1 天
2015-5-11 17:54:41 显示全部楼层
好吧我做出来了

#ifndef CONTROLLER111
#define WIDGET_H CONTROLLER111

要和头文件 controller111一样     就是这个  CONTROLLER111  与WIDGET_H CONTROLLER111
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

公告
可以关注我们的微信公众号yafeilinux_friends获取最新动态,或者加入QQ会员群进行交流:190741849、186601429(已满) 我知道了