24小时热门版块排行榜    

查看: 766  |  回复: 2

zyj8119

木虫 (著名写手)

[求助] 一个MFC的小项目出了问题,求高手帮忙。。

MFC的小项目在这里:
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

好好学习,天天向上。
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zyj8119

木虫 (著名写手)

引用回帖:
Originally posted by zyj8119 at 2011-05-07 20:52:06:
MFC的小项目在这里:

--------------------Configuration: GPACalculator - Win32 Debug--------------------
Compiling...
GPACalculator.cpp
c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(29) : error C2535: 'double __thiscall CGPACalculatorDlg::GetSDPoint(double)' : member function already defined or declared
        c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(26) : see declaration of 'GetSDPoint'
c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(64) : error C2535: 'void __thiscall CGPACalculatorDlg::SpliterString(class CString,double &,double &' : member function already defined or declared
        c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(61) : see declaration of 'SpliterString'
c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(82) : error C2535: 'void __thiscall CGPACalculatorDlg::GatherData(void)' : member function already defined or declared
        c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(80) : see declaration of 'GatherData'
c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(107) : error C2535: 'void __thiscall CGPACalculatorDlg::ChangeType(int)' : member function already defined or declared
        c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(105) : see declaration of 'ChangeType'
c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(162) : error C2535: 'void __thiscall CGPACalculatorDlg::SetEditRead(bool)' : member function already defined or declared
        c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(160) : see declaration of 'SetEditRead'
GPACalculatorDlg.cpp
c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(29) : error C2535: 'double __thiscall CGPACalculatorDlg::GetSDPoint(double)' : member function already defined or declared
        c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(26) : see declaration of 'GetSDPoint'
c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(64) : error C2535: 'void __thiscall CGPACalculatorDlg::SpliterString(class CString,double &,double &' : member function already defined or declared
        c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(61) : see declaration of 'SpliterString'
c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(82) : error C2535: 'void __thiscall CGPACalculatorDlg::GatherData(void)' : member function already defined or declared
        c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(80) : see declaration of 'GatherData'
c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(107) : error C2535: 'void __thiscall CGPACalculatorDlg::ChangeType(int)' : member function already defined or declared
        c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(105) : see declaration of 'ChangeType'
c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(162) : error C2535: 'void __thiscall CGPACalculatorDlg::SetEditRead(bool)' : member function already defined or declared
        c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(160) : see declaration of 'SetEditRead'
C:\Program Files\Microsoft Visual Studio\MyProjects\GPACalculator\GPACalculatorDlg.cpp(298) : error C2509: 'OnCtlColor' : member function not declared in 'CGPACalculatorDlg'
        c:\program files\microsoft visual studio\myprojects\gpacalculator\gpacalculatordlg.h(14) : see declaration of 'CGPACalculatorDlg'
Generating Code...
Error executing cl.exe.

GPACalculator.exe - 11 error(s), 0 warning(s)
好好学习,天天向上。
2楼2011-05-07 20:52:49
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

yalefield

金虫 (文坛精英)

老汉一枚

【答案】应助回帖

zyj8119(金币+20): 感谢老汉一语惊醒梦中人。。。。 2011-05-08 11:42:05
在GPACalculatorDlg.h中,
CODE:
        double GetSDPoint(double dPoint);

        double CGPACalculatorDlg::GetSDPoint(double dPoint)
        {
                UpdateData();
                ....
        }

您既声明了函数,随即又给出函数的实现,不仅很啰嗦,而且使得编译器都嫌您啰嗦。
3楼2011-05-08 09:34:34
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 zyj8119 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 欢迎发来filecode的Mz6后的代码验证其规律 +8 医学老男孩 2026-08-13 15/750 2026-08-13 18:47 by JChen2024
[考博] 澳大利亚 Murdoch University 全奖博士招生(3个名额)地质化工冶金领域 +19 AI8RaGaPaSCR 2026-08-07 20/1000 2026-08-13 18:45 by xpoHTqHwPD8x
[基金申请] FileCode能看出啥? +10 要乐观耀哥 2026-08-10 28/1400 2026-08-13 17:51 by 医学老男孩
[基金申请] 有时候,自然基金真的不能太认真 (我的申报经验) +4 majunge000 2026-08-11 6/300 2026-08-13 16:50 by 四季常青藤
[基金申请] filecode +14 documentary 2026-08-10 16/800 2026-08-13 16:39 by 润生71
[基金申请] Filecode 又变了,巨变 +3 WH3796 2026-08-12 4/200 2026-08-13 14:13 by 小木虫6752397
[基金申请] 2019年青年基金涵评意见,大家看看几个A,几个B? +11 Tide man 2026-08-11 11/550 2026-08-13 07:35 by 撸猫猫
[基金申请] 好奇怪的filecode +5 布布和一二 2026-08-08 6/300 2026-08-12 16:11 by 云上清扬
[基金申请] 综述论文作为代表作会不会影响评审专家的印象分? +11 yufeiwaner 2026-08-09 13/650 2026-08-12 08:17 by yufeiwaner
[基金申请] 是这周出结果还是下周出结果? +3 yuleib84 2026-08-11 3/150 2026-08-11 21:53 by jnhyjjm
[基金申请] 帮忙看看fileCode +7 wwncly 2026-08-10 13/650 2026-08-11 19:36 by 冰心玉壶晴
[基金申请] 为什么网上很多人说本周 12号出结果 +6 瞬息宇宙 2026-08-10 7/350 2026-08-11 19:25 by Tide man
[硕博家园] 读博的好处 +3 lnee 2026-08-11 3/150 2026-08-11 18:10 by 希望我好好的
[基金申请] 关于代码变化问题,想知道的进来 +17 且听虎啸 2026-08-07 24/1200 2026-08-10 18:35 by zhangduo2008
[基金申请] 国自然结果 +4 Vierhys 2026-08-10 8/400 2026-08-10 15:06 by Vierhys
[基金申请] 2026国自然放榜时间 +9 布布和一二 2026-08-08 9/450 2026-08-10 11:22 by xxxx2020
[基金申请] fileCode有新解读? +10 Tide man 2026-08-08 18/900 2026-08-09 12:55 by 仁砚薪传
[基金申请] 化学口download_prp&fileCode的固定段好像这几天一直没变,有变的大神么? +3 Tide man 2026-08-07 4/200 2026-08-07 22:39 by Tide man
[基金申请] 固定端突然变了,今天 +6 archvillain 2026-08-06 10/500 2026-08-07 16:03 by 医学老男孩
[基金申请] filecode变化情况 +6 布布和一二 2026-08-07 22/1100 2026-08-07 14:45 by 且听虎啸
信息提示
请填处理意见