24小时热门版块排行榜    

查看: 764  |  回复: 2
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

zyj8119

木虫 (著名写手)

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

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

» 猜你喜欢

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

好好学习,天天向上。
已阅   回复此楼   关注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的回帖
查看全部 3 个回答

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的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 静等基金结果 +6 gjjjzhong 2026-08-10 18/900 2026-08-13 17:25 by JACS/Angew
[考博] 澳大利亚 Murdoch University 全奖博士招生(3个名额)地质化工冶金领域 +13 AI8RaGaPaSCR 2026-08-07 14/700 2026-08-13 17:15 by KC9MWU4rq4LU
[基金申请] 不应该看fileCode +7 且听虎啸 2026-08-12 9/450 2026-08-13 14:27 by flydreamws
[基金申请] Filecode 又变了,巨变 +3 WH3796 2026-08-12 4/200 2026-08-13 14:13 by 小木虫6752397
[基金申请] 我的国基提前知道中了,可是同事的操作让我实在接受不了,怎么会有这样的人 +9 家与远方 2026-08-10 14/700 2026-08-13 09:41 by 臭臭不臭01
[基金申请] 2019年青年基金涵评意见,大家看看几个A,几个B? +11 Tide man 2026-08-11 11/550 2026-08-13 07:35 by 撸猫猫
[论文投稿] 职称评审,求友友推荐见刊最快的期刊 +4 工厂打螺丝 2026-08-08 4/200 2026-08-12 09:18 by hansi2025
[基金申请] 综述论文作为代表作会不会影响评审专家的印象分? +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 冰心玉壶晴
[硕博家园] 读博的好处 +3 lnee 2026-08-11 3/150 2026-08-11 18:10 by 希望我好好的
[基金申请] 确定了,国自然21号放榜 +6 布布和一二 2026-08-10 7/350 2026-08-10 19:15 by 2000zf36392
[基金申请] 据悉今年马上要出结果了 +7 瞬息宇宙 2026-08-10 8/400 2026-08-10 12:42 by Vivilian
[基金申请] 面上项目filecode邪修 +5 西山十月 2026-08-09 7/350 2026-08-10 07:32 by 仁砚薪传
[基金申请] fileCode有新解读? +10 Tide man 2026-08-08 18/900 2026-08-09 12:55 by 仁砚薪传
[基金申请] 国基金的申报应该改成非等额制,评价高的钱多评价低的钱少,但是增加资助率 +7 a089 2026-08-07 7/350 2026-08-08 18:05 by gltch
[基金申请] 关于filecode +4 布布和一二 2026-08-07 7/350 2026-08-07 22:55 by zhanghaozhu
[基金申请] 化学口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 且听虎啸
信息提示
请填处理意见