在Password.cpp文件的前面加入包含类CpasswordDialog的头文件 如何添加。。

来源:百度知道 编辑:UC知道 时间:2024/06/24 14:19:13
自学C++中。。这里相当不会。。
是一个输入密码的软件。。就是书上写加个头文件。。我不会。。
而且还要什么包含类CpasswordDialog。。不知道是什么意思。。

是这样吗?

// password.cpp : Defines the class behaviors for the application.
//

#include "Cpassworddialog.h"
#include "stdafx.h"
#include "password.h"

#include "MainFrm.h"
#include "passwordDoc.h"
#include "passwordView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

不过他又会说Cpassworddialog什么没有定义

CpasswordDialog没听说过,估计是他自己写的对话框类。再好好看看那书。
这个编译出错也不应该说Cpassworddialog什么没有定义,而应该说Cpassworddialog.h找不到。
既然说Cpassworddialog什么没有定义,那就说明Cpassworddialog.h找到了。去Cpassworddialog.h文件看看他的类的名字是不是Cpassworddialog,注意大小写。

建议将代码压一下上传到何丹的论坛