| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4330 人关注过本帖
标题:帮忙找错误
只看楼主 加入收藏
ghethe
Rank: 1
等 级:新手上路
帖 子:22
专家分:6
注 册:2008-10-23
结帖率:87.5%
收藏
已结贴  问题点数:20 回复次数:5 
帮忙找错误
f:\ghethe\ex_input\ex_inputdlg.h(30) : error C2236: unexpected 'class' 'CEx_InputDlg'
:\ghethe\ex_input\ex_inputdlg.h(30) : error C2143: syntax error : missing ';' before ':'
f:\ghethe\ex_input\ex_inputdlg.h(30) : error C2143: syntax error : missing ';' before ':'
f:\ghethe\ex_input\ex_inputdlg.h(30) : error C2143: syntax error : missing ';' before 'public'
f:\ghethe\ex_input\ex_inputdlg.h(31) : error C2143: syntax error : missing ';' before '{'
f:\ghethe\ex_input\ex_inputdlg.h(31) : error C2447: missing function header (old-style formal list?)
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(62) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(63) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(63) : error C2065: 'IDD' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(64) : error C2550: 'CEx_InputDlg' : constructor initializer lists are only allowed on constructor definitions
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(66) : error C2065: 'm_strName' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(66) : error C2440: '=' : cannot convert from 'char [1]' to 'int'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(67) : error C2065: 'm_strNO' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(67) : error C2440: '=' : cannot convert from 'char [1]' to 'int'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(68) : error C2065: 'm_fScore1' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(68) : warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(69) : error C2065: 'm_fScore2' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(69) : warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(70) : error C2065: 'm_fScore3' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(70) : warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(73) : error C2065: 'm_hIcon' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(73) : error C2440: '=' : cannot convert from 'struct HICON__ *' to 'int'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(74) : warning C4508: 'CEx_InputDlg' : function should return a value; 'void' return type assumed
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(76) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(78) : error C2248: 'DoDataExchange' : cannot access protected member declared in class 'CWnd'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2414) : see declaration of 'DoDataExchange'
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(78) : error C2352: 'CWnd::DoDataExchange' : illegal call of non-static member function
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2414) : see declaration of 'DoDataExchange'
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(80) : error C2065: 'm_ListBox' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(81) : error C2065: 'm_spinScore3' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(82) : error C2065: 'm_spinScore2' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(83) : error C2065: 'm_spinScore1' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(84) : error C2065: 'm_comboNO' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2248: 'messageMap' : cannot access protected member declared in class 'CDialog'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2667) : see declaration of 'messageMap'
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2270: 'GetMessageMap' : modifiers not allowed on nonmember functions
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2065: 'messageMap' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2373: 'messageMap' : redefinition; different type modifiers
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2065: '_messageEntries' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2109: subscript requires array or pointer type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2102: '&' requires l-value
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(98) : error C2040: '_messageEntries' : 'const struct AFX_MSGMAP_ENTRY []' differs in levels of indirection from 'int'
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(100) : error C2065: 'OnSysCommand' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(100) : error C2440: 'type cast' : cannot convert from 'int *' to 'void (__thiscall CWnd::*)(unsigned int,long)'
        There is no context in which this conversion is possible
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(101) : error C2065: 'OnPaint' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(101) : error C2440: 'type cast' : cannot convert from 'int *' to 'void (__thiscall CWnd::*)(void)'
        There is no context in which this conversion is possible
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(102) : error C2065: 'OnQueryDragIcon' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(102) : error C2440: 'type cast' : cannot convert from 'int *' to 'struct HICON__ *(__thiscall CWnd::*)(void)'
        There is no context in which this conversion is possible
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(103) : error C2065: 'OnButtonAdd' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(103) : error C2440: 'type cast' : cannot convert from 'int *' to 'void (__thiscall CCmdTarget::*)(void)'
        There is no context in which this conversion is possible
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(104) : error C2065: 'OnButtonDel' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(104) : error C2440: 'type cast' : cannot convert from 'int *' to 'void (__thiscall CCmdTarget::*)(void)'
        There is no context in which this conversion is possible
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(105) : error C2065: 'OnDestroy' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(105) : error C2440: 'type cast' : cannot convert from 'int *' to 'void (__thiscall CWnd::*)(void)'
        There is no context in which this conversion is possible
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(106) : error C2065: 'OnSelchangeList1' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(106) : error C2440: 'type cast' : cannot convert from 'int *' to 'void (__thiscall CCmdTarget::*)(void)'
        There is no context in which this conversion is possible
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(113) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(115) : error C2352: 'CDialog::OnInitDialog' : illegal call of non-static member function
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2613) : see declaration of 'OnInitDialog'
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(123) : error C2660: 'GetSystemMenu' : function does not take 1 parameters
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(137) : error C2065: 'SetIcon' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(141) : error C2228: left of '.SetRange' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(142) : error C2228: left of '.SetRange' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(143) : error C2228: left of '.SetRange' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(148) : error C2228: left of '.InsertString' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(150) : error C2228: left of '.SetCurSel' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(155) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(156) : error C2373: 'OnSysCommand' : redefinition; different type modifiers
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(164) : error C2248: 'OnSysCommand' : cannot access protected member declared in class 'CWnd'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2330) : see declaration of 'OnSysCommand'
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(164) : error C2352: 'CWnd::OnSysCommand' : illegal call of non-static member function
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2330) : see declaration of 'OnSysCommand'
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(172) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(173) : error C2373: 'OnPaint' : redefinition; different type modifiers
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(174) : error C2660: 'IsIconic' : function does not take 0 parameters
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(176) : error C2673: 'OnPaint' : global functions do not have 'this' pointers
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(178) : error C2660: 'SendMessageA' : function does not take 3 parameters
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(184) : error C2660: 'GetClientRect' : function does not take 1 parameters
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(193) : error C2248: 'OnPaint' : cannot access protected member declared in class 'CWnd'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2295) : see declaration of 'OnPaint'
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(193) : error C2352: 'CWnd::OnPaint' : illegal call of non-static member function
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2295) : see declaration of 'OnPaint'
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(199) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(200) : error C2373: 'OnQueryDragIcon' : redefinition; different type modifiers
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(204) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(205) : error C2373: 'OnButtonAdd' : redefinition; different type modifiers
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(207) : error C2065: 'UpdateData' : undeclared identifier
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(208) : error C2228: left of '.TrimLeft' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(209) : error C2228: left of '.TrimRight' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(210) : error C2228: left of '.IsEmpty' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(212) : error C2059: syntax error : ')'
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(218) : error C2228: left of '.AddString' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(219) : error C2228: left of '.SetItemDataPtr' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(222) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(223) : error C2373: 'OnButtonDel' : redefinition; different type modifiers
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(225) : error C2228: left of '.GetCurSel' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(228) : error C2228: left of '.GetItemDataPtr' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(229) : error C2228: left of '.DeleteString' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(232) : error C2660: 'GetDlgItem' : function does not take 1 parameters
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(232) : error C2227: left of '->EnableWindow' must point to class/struct/union
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(235) : error C2653: 'CEx_InputDlg' : is not a class or namespace name
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(236) : error C2373: 'OnDestroy' : redefinition; different type modifiers
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(237) : error C2248: 'OnDestroy' : cannot access protected member declared in class 'CWnd'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2283) : see declaration of 'OnDestroy'
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(237) : error C2352: 'CWnd::OnDestroy' : illegal call of non-static member function
        c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2283) : see declaration of 'OnDestroy'
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(240) : error C2228: left of '.GetCount' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(242) : error C2228: left of '.GetItemDataPtr' must have class/struct/union type
F:\ghethe\Ex_Input\Ex_InputDlg.cpp(242) : fatal error C1003: error count exceeds 100; stopping compilation
Error executing cl.exe.
Ex_InputDlg.obj - 102 error(s), 4 warning(s)


[ 本帖最后由 ghethe 于 2009-9-1 15:58 编辑 ]
搜索更多相关主题的帖子: unexpected public before 
2009-09-01 15:57
xufen340
Rank: 9Rank: 9Rank: 9
等 级:蜘蛛侠
帖 子:166
专家分:1351
注 册:2009-8-7
收藏
得分:0 
贴代码吧
2009-09-01 20:34
xufen340
Rank: 9Rank: 9Rank: 9
等 级:蜘蛛侠
帖 子:166
专家分:1351
注 册:2009-8-7
收藏
得分:0 
贴代码
2009-09-01 20:34
debroa723
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:23
帖 子:862
专家分:1954
注 册:2008-10-12
收藏
得分:10 
你的文件中出现了非法字符,这个非法字符可能是无意中打入的,也可能是因为开了输出法后输入的标点符号。它的位置应该在class CEx_InputDlg之前 ,也就可能是在ex_inputdlg.h里,或是在依包含头文件的顺序,在ex_inputdlg.h被包含的前一个头文件的CPP文件。所以,还是仔细检查一下文件,ex_inputdlg.h文件的嫌疑最大,看class CEx_InputD前面是不是多打了字符或是少打了结束符,一直到文件的头部。
收到的鲜花
  • ghethe2009-09-02 10:41 送鲜花  3朵   附言:我很赞同
2009-09-02 00:34
debroa723
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:23
帖 子:862
专家分:1954
注 册:2008-10-12
收藏
得分:10 
你的文件中出现了非法字符,这个非法字符可能是无意中打入的,也可能是因为开了输出法后输入的标点符号。它的位置应该在class CEx_InputDlg之前 ,也就可能是在ex_inputdlg.h里,或是在依包含头文件的顺序,在ex_inputdlg.h被包含的前一个头文件的CPP文件。所以,还是仔细检查一下文件,ex_inputdlg.h文件的嫌疑最大,看class CEx_InputD前面是不是多打了字符或是少打了结束符,一直到文件的头部。
2009-09-02 00:34
ghethe
Rank: 1
等 级:新手上路
帖 子:22
专家分:6
注 册:2008-10-23
收藏
得分:0 
回复 4楼 debroa723
谢谢了,还真是的
2009-09-02 09:42
快速回复:帮忙找错误
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020492 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved