各位高手好,我有一VC++6.0程序在调试时总是遇到错误,请各位高手帮忙,非常感谢。

提示的错误如下:G:\c++exercise\CompuInfo1\InfoDlg.cpp(62):errorC2072:'CPUType':initialization... 提示的错误如下:
G:\c++exercise\CompuInfo1\InfoDlg.cpp(62) : error C2072: 'CPUType' : initialization of a function
G:\c++exercise\CompuInfo1\InfoDlg.cpp(71) : error C2509: 'OnInitDialog' : member function not declared in 'CInfoDlg'
g:\c++exercise\compuinfo1\infodlg.h(13) : see declaration of 'CInfoDlg'
G:\c++exercise\CompuInfo1\InfoDlg.cpp(102) : error C2039: 'OnBtnReset' : is not a member of 'CInfoDlg'
g:\c++exercise\compuinfo1\infodlg.h(13) : see declaration of 'CInfoDlg'
G:\c++exercise\CompuInfo1\InfoDlg.cpp(103) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Generating Code...
Error executing cl.exe.
CompuInfo1.exe - 4 error(s), 0 warning(s)

其中的部分代码如下,

//预定义列表框的字符串数组
static CString CPUType()=
{
"AMD K5", "Intel Pentium","Cyrix Mll",
"AMD K6", "Intel Pentium Pro","AMD K6-2",
"Intel Celeron","Intel Pentium2","Intel Pentium3",
};

BOOL CInfoDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
//为列表框添加选项
for(int i=0;i<=8;i++)
{
m_LstCPU.AddString(CPUType(i));

}
m_LstCPU.SelectString(-1,m_szCPU);

//为组合可添加选项

m_CmbHDD.AddString("1.2G");
m_CmbHDD.AddString("1.7G");
m_CmbHDD.AddString("2.1G");
m_CmbHDD.AddString("3.2G");
m_CmbHDD.AddString("6.4G");
m_CmbHDD.AddString("10G");

return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
展开
 我来答
gongxy_sh
2013-07-19 · 超过18用户采纳过TA的回答
知道答主
回答量:45
采纳率:0%
帮助的人:50.1万
展开全部
static LPCSTR CPUType[]=
名片
2025-08-11 广告
正版Hyperworks软件多少钱,购买正版Hyperworks软件,免费咨询Altair Hyperworks软件中国区网站首页,HyperWorks软件提供了完整的CAE有限元分析解决方案,免费试用和咨询官网。... 点击进入详情页
本回答由名片提供
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式