
MFC 在线等~急急急!!!帮我看看到底哪错了!!!!
#pragmaonce#include"MainFrm.h"#include<sstream>usingnamespacestd;//dlg3对话框classdlg3:p...
#pragma once
#include "MainFrm.h"
#include <sstream>
using namespace std;
// dlg3 对话框
class dlg3 : public CDialog
{
DECLARE_DYNAMIC(dlg3)
public:
dlg3(CWnd* pParent = NULL); // 标准构造函数
virtual ~dlg3();
// 对话框数据
enum { IDD = IDD_DIALOG2 };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
public:
CMainFrame *hi;//?????????????????????????错误
CString namai;
public:
afx_msg void OnBnClickedOk();
};
报错:
1>------ 已启动生成: 项目: tong, 配置: Debug Win32 ------
1>正在编译...
1>CxxApp.cpp
1>f:\c++试验\tong\tong\dlg3.h(17) : error C2065: “IDD_DIALOG2”: 未声明的标识符
1>f:\c++试验\tong\tong\dlg3.h(26) : error C2143: 语法错误 : 缺少“;”(在“*”的前面)
1>f:\c++试验\tong\tong\dlg3.h(26) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\c++试验\tong\tong\dlg3.h(26) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\c++试验\tong\tong\dlg.h(18) : error C2065: “IDD_DIALOG1”: 未声明的标识符
1>dlg.cpp
1>dlg3.cpp
1>MainFrm.cpp
1>f:\c++试验\tong\tong\dlg3.h(26) : error C2143: 语法错误 : 缺少“;”(在“*”的前面)
1>f:\c++试验\tong\tong\dlg3.h(26) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\c++试验\tong\tong\dlg3.h(26) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>tong.cpp
1>f:\c++试验\tong\tong\dlg3.h(26) : error C2143: 语法错误 : 缺少“;”(在“*”的前面)
1>f:\c++试验\tong\tong\dlg3.h(26) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\c++试验\tong\tong\dlg3.h(26) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>正在生成代码...
1>正在跳过...(未检测到相关更改)
1>tongView.cpp
1>生成日志保存在“file://f:\C++试验\tong\tong\Debug\BuildLog.htm”
1>tong - 11 个错误,0 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========
源代码:
htt*p:*//ww*w.jsha*rer.com*/file*/1371393*.*htm
去星号
在线等~~~急急急~~!!!
类声明~~~像函数一样 一个类在别的类排行(解决方案那)后面的话,这个类在被前面的类调用的时候必须在该类前先声明后面那个类 然后再使用,否则会发生上面的错误,就像函数声明那样而已,终于解决了 展开
#include "MainFrm.h"
#include <sstream>
using namespace std;
// dlg3 对话框
class dlg3 : public CDialog
{
DECLARE_DYNAMIC(dlg3)
public:
dlg3(CWnd* pParent = NULL); // 标准构造函数
virtual ~dlg3();
// 对话框数据
enum { IDD = IDD_DIALOG2 };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
public:
CMainFrame *hi;//?????????????????????????错误
CString namai;
public:
afx_msg void OnBnClickedOk();
};
报错:
1>------ 已启动生成: 项目: tong, 配置: Debug Win32 ------
1>正在编译...
1>CxxApp.cpp
1>f:\c++试验\tong\tong\dlg3.h(17) : error C2065: “IDD_DIALOG2”: 未声明的标识符
1>f:\c++试验\tong\tong\dlg3.h(26) : error C2143: 语法错误 : 缺少“;”(在“*”的前面)
1>f:\c++试验\tong\tong\dlg3.h(26) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\c++试验\tong\tong\dlg3.h(26) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\c++试验\tong\tong\dlg.h(18) : error C2065: “IDD_DIALOG1”: 未声明的标识符
1>dlg.cpp
1>dlg3.cpp
1>MainFrm.cpp
1>f:\c++试验\tong\tong\dlg3.h(26) : error C2143: 语法错误 : 缺少“;”(在“*”的前面)
1>f:\c++试验\tong\tong\dlg3.h(26) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\c++试验\tong\tong\dlg3.h(26) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>tong.cpp
1>f:\c++试验\tong\tong\dlg3.h(26) : error C2143: 语法错误 : 缺少“;”(在“*”的前面)
1>f:\c++试验\tong\tong\dlg3.h(26) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\c++试验\tong\tong\dlg3.h(26) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>正在生成代码...
1>正在跳过...(未检测到相关更改)
1>tongView.cpp
1>生成日志保存在“file://f:\C++试验\tong\tong\Debug\BuildLog.htm”
1>tong - 11 个错误,0 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========
源代码:
htt*p:*//ww*w.jsha*rer.com*/file*/1371393*.*htm
去星号
在线等~~~急急急~~!!!
类声明~~~像函数一样 一个类在别的类排行(解决方案那)后面的话,这个类在被前面的类调用的时候必须在该类前先声明后面那个类 然后再使用,否则会发生上面的错误,就像函数声明那样而已,终于解决了 展开
1个回答
展开全部
“IDD_DIALOG1”: 未声明的标识符
在出现这样的头文件里添加 #include "resource.h"
你的源代码下不了
在出现这样的头文件里添加 #include "resource.h"
你的源代码下不了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询