MFC 如何添加struct?

MFC 如何添加struct?,第1张

添加struct要什么向导。。。。

直接在你需要的文件首部,包含文件之后,定姿碰义戚告即迹仔谈可:

struct XXX{

xxxx

xxxx

}sXXX

1)经常我尘并散们在MFC中如我们定义类或者蔽银结构体时,就会出现如下错误:

E:/MusicRetrieval/FFT.CPP(3) : error C2146: syntax error : missing '' before identifier 'W'

E:/MusicRetrieval/FFT.CPP(3) : error C2501: 'complex' : missing storage-class or type specifiers

E:/MusicRetrieval/FFT.CPP(3) : fatal error C1004: unexpected end of file found解决办法:将头文件加派氏到stdafx.h;

2)出现如下错误时:

e:/musicretrieval/audiofeature.cpp(118) : fatal error C1010: unexpected end of file while looking for precompiled header directive解决办法:将stdafx.h加你cpp文件中

这个在向导扮掘里不可以直接写你的基类,

就只能在自己的代码手动添加

首先要亏逗把你自己写的那个类的头文件加入到新类的头文厅空核件中

#include "firstDlg.h"

class secondDlg: public firstDlg

{

}


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/bake/11986378.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-20
下一篇 2023-05-20

发表评论

登录后才能评论

评论列表(0条)

保存