我来我网
https://5come5.cn
 
您尚未 登录  注册 | 菠菜 | 软件站 | 音乐站 | 邮箱1 | 邮箱2 | 风格选择 | 更多 » 
 

本页主题: [求助]求高人找出下面程序中的问题。 显示签名 | 打印 | 加为IE收藏 | 收藏主题 | 上一主题 | 下一主题

wildwind



性别: 保密 状态: 该用户目前不在线
等级: 栋梁之材
发贴: 785
威望: 1
浮云: 1134
在线等级:
注册时间: 2004-04-08
最后登陆: 2007-06-27

5come5帮你背单词 [ minimum /'miniməm/ n. 最小量,最低限度 ]


[求助]求高人找出下面程序中的问题。

在WinApp.h的HINSTANCE GetAppHandle();前的分号去掉就会出错,
哪个达人来解释一下。
顶端 Posted: 2006-11-06 09:09 | [楼 主]
chsml



性别: 帅哥 状态: 该用户目前不在线
头衔: 知识真是重要呀, 可以用来 B4 人
等级: 人见人爱
发贴: 3028
威望: 1
浮云: 1200
在线等级:
注册时间: 2004-12-07
最后登陆: 2007-09-12

5come5帮你背单词 [ cancel /'kænsəl/ vt. 取消,作废,删去,划掉 ]


电脑在外头 同学的机器没编译环境 不能帮到了
顶端 Posted: 2006-11-06 09:19 | [1 楼]
chsml



性别: 帅哥 状态: 该用户目前不在线
头衔: 知识真是重要呀, 可以用来 B4 人
等级: 人见人爱
发贴: 3028
威望: 1
浮云: 1200
在线等级:
注册时间: 2004-12-07
最后登陆: 2007-09-12

5come5帮你背单词 [ bend /bend/ v. (使)弯曲;(使)屈服 ]


没有包含windows.h
你把编译错误给我看, 是不是类型未定义和语句未结束,需要";"那些
顶端 Posted: 2006-11-06 09:25 | [2 楼]
wildwind



性别: 保密 状态: 该用户目前不在线
等级: 栋梁之材
发贴: 785
威望: 1
浮云: 1134
在线等级:
注册时间: 2004-04-08
最后登陆: 2007-06-27

5come5帮你背单词 [ crate /kreit/ n. 轰响,坠毁,碰撞;v. 碰撞,粉碎 ]


如下:
#ifndef __WinApp_H__
#define __WinAPP_H__

#include "AppEntry.h"

//获得主程序句柄
;HINSTANCE GetAppHandle();//就是这里了。
//获得主窗口句柄
HWND GetMainWnd();

#endif //__WinAPP_H__
顶端 Posted: 2006-11-06 10:10 | [3 楼]
不该去整容



性别: 保密 状态: 该用户目前不在线
等级: 初出茅庐
家族: 水族馆
发贴: 64
威望: 0
浮云: 1166
在线等级:
注册时间: 2006-11-06
最后登陆: 2006-11-13

5come5帮你背单词 [ succession /sək'seən/ n. 接连发生,连续,继承(权) ]


貌似看不懂,期待高手。。
顶端 Posted: 2006-11-06 13:31 | [4 楼]
chsml



性别: 帅哥 状态: 该用户目前不在线
头衔: 知识真是重要呀, 可以用来 B4 人
等级: 人见人爱
发贴: 3028
威望: 1
浮云: 1200
在线等级:
注册时间: 2004-12-07
最后登陆: 2007-09-12

5come5帮你背单词 [ capitalism /'kæpitəlizəm/ a. 资本主义 ]


jiao ni fa bian yi qi de cuo wu ti shi...
顶端 Posted: 2006-11-06 13:33 | [5 楼]
wildwind



性别: 保密 状态: 该用户目前不在线
等级: 栋梁之材
发贴: 785
威望: 1
浮云: 1134
在线等级:
注册时间: 2004-04-08
最后登陆: 2007-06-27

5come5帮你背单词 [ vehicle /'vi:ikl/ n. 交通工具,车辆,工具,手段 ]


--------------------Configuration: tank - Win32 Debug--------------------
Compiling...
WinApp.cpp
d:\bc++\study\tank\winapp.h(10) : error C2146: syntax error : missing ';' before identifier 'GetAppHandle'
d:\bc++\study\tank\winapp.h(10) : error C2259: 'IAppEntry' : cannot instantiate abstract class due to following members:
    d:\bc++\study\tank\appentry.h(12) : see declaration of 'IAppEntry'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'bool __thiscall IAppEntry::Initialize(struct HINSTANCE__ *,struct HWND__ *)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(14) : see declaration of 'Initialize'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'void __thiscall IAppEntry::Terminal(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(16) : see declaration of 'Terminal'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'void __thiscall IAppEntry::Process(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(18) : see declaration of 'Process'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'void __thiscall IAppEntry::Render(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(20) : see declaration of 'Render'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'long __thiscall IAppEntry::WndProc(unsigned int,unsigned int,long)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(22) : see declaration of 'WndProc'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'const char *__thiscall IAppEntry::WindowClassName(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(24) : see declaration of 'WindowClassName'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'const int __thiscall IAppEntry::WindowWidth(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(26) : see declaration of 'WindowWidth'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'const int __thiscall IAppEntry::WindowHeight(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(28) : see declaration of 'WindowHeight'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'struct HINSTANCE__ *__thiscall IAppEntry::GetInstance(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(30) : see declaration of 'GetInstance'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'struct HWND__ *__thiscall IAppEntry::GetWnd(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(32) : see declaration of 'GetWnd'
d:\bc++\study\tank\winapp.h(10) : error C2377: 'HINSTANCE' : redefinition; typedef cannot be overloaded with any other symbol
    c:\program files\microsoft visual studio\vc98\include\windef.h(252) : see declaration of 'HINSTANCE'
d:\bc++\study\tank\winapp.h(10) : error C2259: 'IAppEntry' : cannot instantiate abstract class due to following members:
    d:\bc++\study\tank\appentry.h(12) : see declaration of 'IAppEntry'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'bool __thiscall IAppEntry::Initialize(struct HINSTANCE__ *,struct HWND__ *)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(14) : see declaration of 'Initialize'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'void __thiscall IAppEntry::Terminal(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(16) : see declaration of 'Terminal'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'void __thiscall IAppEntry::Process(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(18) : see declaration of 'Process'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'void __thiscall IAppEntry::Render(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(20) : see declaration of 'Render'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'long __thiscall IAppEntry::WndProc(unsigned int,unsigned int,long)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(22) : see declaration of 'WndProc'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'const char *__thiscall IAppEntry::WindowClassName(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(24) : see declaration of 'WindowClassName'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'const int __thiscall IAppEntry::WindowWidth(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(26) : see declaration of 'WindowWidth'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'const int __thiscall IAppEntry::WindowHeight(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(28) : see declaration of 'WindowHeight'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'struct HINSTANCE__ *__thiscall IAppEntry::GetInstance(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(30) : see declaration of 'GetInstance'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'struct HWND__ *__thiscall IAppEntry::GetWnd(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(32) : see declaration of 'GetWnd'
d:\bc++\study\tank\winapp.h(10) : fatal error C1004: unexpected end of file found
AppGame.cpp
d:\bc++\study\tank\winapp.h(10) : error C2146: syntax error : missing ';' before identifier 'GetAppHandle'
d:\bc++\study\tank\winapp.h(10) : error C2259: 'IAppEntry' : cannot instantiate abstract class due to following members:
    d:\bc++\study\tank\appentry.h(12) : see declaration of 'IAppEntry'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'bool __thiscall IAppEntry::Initialize(struct HINSTANCE__ *,struct HWND__ *)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(14) : see declaration of 'Initialize'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'void __thiscall IAppEntry::Terminal(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(16) : see declaration of 'Terminal'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'void __thiscall IAppEntry::Process(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(18) : see declaration of 'Process'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'void __thiscall IAppEntry::Render(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(20) : see declaration of 'Render'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'long __thiscall IAppEntry::WndProc(unsigned int,unsigned int,long)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(22) : see declaration of 'WndProc'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'const char *__thiscall IAppEntry::WindowClassName(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(24) : see declaration of 'WindowClassName'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'const int __thiscall IAppEntry::WindowWidth(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(26) : see declaration of 'WindowWidth'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'const int __thiscall IAppEntry::WindowHeight(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(28) : see declaration of 'WindowHeight'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'struct HINSTANCE__ *__thiscall IAppEntry::GetInstance(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(30) : see declaration of 'GetInstance'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'struct HWND__ *__thiscall IAppEntry::GetWnd(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(32) : see declaration of 'GetWnd'
d:\bc++\study\tank\winapp.h(10) : error C2377: 'HINSTANCE' : redefinition; typedef cannot be overloaded with any other symbol
    c:\program files\microsoft visual studio\vc98\include\windef.h(252) : see declaration of 'HINSTANCE'
d:\bc++\study\tank\winapp.h(10) : error C2259: 'IAppEntry' : cannot instantiate abstract class due to following members:
    d:\bc++\study\tank\appentry.h(12) : see declaration of 'IAppEntry'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'bool __thiscall IAppEntry::Initialize(struct HINSTANCE__ *,struct HWND__ *)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(14) : see declaration of 'Initialize'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'void __thiscall IAppEntry::Terminal(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(16) : see declaration of 'Terminal'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'void __thiscall IAppEntry::Process(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(18) : see declaration of 'Process'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'void __thiscall IAppEntry::Render(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(20) : see declaration of 'Render'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'long __thiscall IAppEntry::WndProc(unsigned int,unsigned int,long)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(22) : see declaration of 'WndProc'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'const char *__thiscall IAppEntry::WindowClassName(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(24) : see declaration of 'WindowClassName'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'const int __thiscall IAppEntry::WindowWidth(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(26) : see declaration of 'WindowWidth'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'const int __thiscall IAppEntry::WindowHeight(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(28) : see declaration of 'WindowHeight'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'struct HINSTANCE__ *__thiscall IAppEntry::GetInstance(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(30) : see declaration of 'GetInstance'
d:\bc++\study\tank\winapp.h(10) : warning C4259: 'struct HWND__ *__thiscall IAppEntry::GetWnd(void)' : pure virtual function was not defined
    d:\bc++\study\tank\appentry.h(32) : see declaration of 'GetWnd'
d:\bc++\study\tank\winapp.h(10) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

tank.exe - 10 error(s), 40 warning(s)

发了。
顶端 Posted: 2006-11-06 18:55 | [6 楼]
wildwind



性别: 保密 状态: 该用户目前不在线
等级: 栋梁之材
发贴: 785
威望: 1
浮云: 1134
在线等级:
注册时间: 2004-04-08
最后登陆: 2007-06-27

5come5帮你背单词 [ pray /prei/ v. 祈祷,渴望,祈求 ]


找到问题的关键了,KAO,原来在定义类时}号后要加;
顶端 Posted: 2006-11-06 19:21 | [7 楼]
chsml



性别: 帅哥 状态: 该用户目前不在线
头衔: 知识真是重要呀, 可以用来 B4 人
等级: 人见人爱
发贴: 3028
威望: 1
浮云: 1200
在线等级:
注册时间: 2004-12-07
最后登陆: 2007-09-12

5come5帮你背单词 [ nose /nəuz/ n. 鼻子;vt. 闻出,探出;vi. 嗅,闻 ]


呵呵
顶端 Posted: 2006-11-07 01:42 | [8 楼]
我来我网·5come5 Forum » 程序员之家

Total 0.008956(s) query 5, Time now is:11-24 00:20, Gzip enabled
Powered by PHPWind v5.3, Localized by 5come5 Tech Team, 黔ICP备16009856号