本文介绍了Xenon 2000项目pcf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我试图通过mags(最终),但第一个是给我 代码warrior'的编译器给我以下错误/警告,任何帮助 please? 错误:未定义标识符''DIK_OEM_102'' gs_keycodes.h第106行gsKEY_OEM_102 = DIK_OEM_102, 项目:demo1 .mcp,目标:Windows C ++ GUI调试,源文件:demo1.cpp 错误:未定义标识符''DIK_PAUSE'' gs_keycodes.h第114行gsKEY_PAUSE = DIK_PAUSE, 项目:demo1.mcp,目标:Windows C ++ GUI调试,源文件:demo1.cpp 错误:声明语法错误 gs_scoretable.h第23行const int gsSCORE_NAME_SIZE = 3; 项目:demo1.mcp,目标:Windows C ++ GUI调试,源文件:demo1.cpp 错误:声明语法错误 gs_soundsystem.h第24行类gsCSoundSystem:public gsCObject 项目:demo1.mcp,Tar获取:Windows C ++ GUI调试,源文件:demo1.cpp 错误:声明语法错误 gs_soundsystem.h第25行{ 项目:demo1.mcp,目标:Windows C ++ GUI调试,源文件:demo1.cpp 错误:声明语法错误 gs_soundsystem.h line 26私有: 项目:demo1.mcp,目标:Windows C ++ GUI调试,源文件:demo1.cpp 错误:声明语法错误 gs_soundsystem.h第33行public: 项目:demo1.mcp,目标:Windows C ++ GUI调试,源文件:demo1.cpp 警告:C ++中不再支持隐式''int'' gs_soundsystem.h第34行gsCSoundSystem(); 项目:demo1.mcp,目标:Windows C ++ GUI调试,源文件:demo1.cpp 错误:非法函数重载 gs_soundsystem.h第34行gsCSoundSystem(); 项目:demo1.mcp,目标:Windows C ++ GUI Debu g,源文件:demo1.cpp 警告:C ++不再支持隐式''int'' gs_soundsystem.h第35行gsCSoundSystem() ; 项目:demo1.mcp,目标:Windows C ++ GUI调试,源文件:demo1.cpp 错误:非法函数重载 gs_soundsystem.h第35行gsCSoundSystem(); 项目:demo1.mcp,目标:Windows C ++ GUI调试,源文件:demo1.cpp 错误:'''''预计 demo1.cpp第235行} 项目:demo1.mcp,目标:Windows C ++ GUI调试,源文件:demo1.cpp im trying to work throught the mags(finially) but the first one is giving mecode warrior''s compiler is giving me the following errors/warnings,any helpplease?Error : undefined identifier ''DIK_OEM_102''gs_keycodes.h line 106 gsKEY_OEM_102 = DIK_OEM_102,Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp Error : undefined identifier ''DIK_PAUSE''gs_keycodes.h line 114 gsKEY_PAUSE = DIK_PAUSE,Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp Error : declaration syntax errorgs_scoretable.h line 23 const int gsSCORE_NAME_SIZE = 3;Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp Error : declaration syntax errorgs_soundsystem.h line 24 class gsCSoundSystem : public gsCObjectProject: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp Error : declaration syntax errorgs_soundsystem.h line 25 {Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp Error : declaration syntax errorgs_soundsystem.h line 26 private:Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp Error : declaration syntax errorgs_soundsystem.h line 33 public:Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp Warning : implicit ''int'' is no longer supported in C++gs_soundsystem.h line 34 gsCSoundSystem();Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp Error : illegal function overloadinggs_soundsystem.h line 34 gsCSoundSystem();Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp Warning : implicit ''int'' is no longer supported in C++gs_soundsystem.h line 35 gsCSoundSystem();Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp Error : illegal function overloadinggs_soundsystem.h line 35 gsCSoundSystem();Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp Error : ''}'' expecteddemo1.cpp line 235 }Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp 推荐答案 [错误消息剪辑] 您希望在没有引用源代码的情况下获得有关错误消息的帮助 导致错误。你认为我们是通灵的吗? john [error messages snipped] You are expecting help on error messages without quoting the source codethat is giving rise to the errors. Do you think we are psychic? john 给我 help help [错误信息已剪断] 您希望在不引用源代码的情况下获取有关错误消息的帮助对错误。你认为我们是通灵的吗? 约翰 [error messages snipped] You are expecting help on error messages without quoting the source code that is giving rise to the errors. Do you think we are psychic? john 你想要4页代码吗? 他们不适合这里但是在这里。 1) 错误:未定义的标识符''DIK_OEM_102'' gs_keycodes.h line 106 gsKEY_OEM_102 = DIK_OEM_102 , code = gsKEY_OEM_102 = DIK_OEM_102, 2) 错误:未定义标识符''DIK_PAUSE'' gs_keycodes.h第114行gsKEY_PAUSE = DIK_PAUSE, code = gsKEY_PAUSE = DIK_PAUSE, 3) 错误:'';''预计 gs_scoretable.h第23行const Int gsSCORE_NAME_SIZE = 3; code = // ---------------------------------------------- --------------- const Int gsSCORE_NAME_SIZE = 3; // --- -------------------------------------------------- -------- 4) 错误:未定义的标识符''gsSCORE_NAME_SIZE'' gs_scoretable.h第30行char m_name [gsSCORE_NAME_SIZE]; code = // ----------- -------------------------------------------------- struct gsScoreItem { int m_score; char m_name [gsSCORE_NAME_SIZE]; }; // ---------------------------- --------------------------------- 5) 错误:'';''预计 gs_soundsystem.h第24行类gsCSoundSystem:public gsCObject 6) 错误:声明语法错误 gs_soundsystem.h第26行私有: 7) 错误:声明语法错误 gs_soundsystem.h第33行public: 8) 警告:C ++中不再支持隐式''int'' gs_soundsystem.h第34行gsCSoundSystem() 9) 错误:'';''预计 gs_soundsystem.h第35行gsCSoundSystem(); code = // ---------------------------- --------------------------------- 类gsCSoundSystem:public gsCObject 私人: bool m_active; gsCList< gsCSample *> m_sample_list; gsCList< gsCMusic *> m_music_list; gsCMusic * m_current_music; public: gsCSoundSystem() gsCSoundSystem(); bool create(); bool destroy(); bool isActive( ); void clearMusicList(); bool addMusic(const char * filename); int getNumberOfMusics(); bool playMusic(int index); void stopMusic(); bool isMusicFinished(); void clearSampleList(); bool addSample(const char * filename); int getNumberOfSamples(); bool playSample(int index ,int panning = 0); void stopSamples(); void setVolume(int music_percent,int sample_percent); } // ----------------------------------- ------------------------- 10) 错误:声明语法错误 gs_sprite.h第66行内联void gsCSprite :: setActive(bool state) 代码= // ---------------------------------- --------------------------- inline void gsCSprite :: setActive(bool state) { m_active =州; } // ------- -------------------------------------------------- ---- 11) 错误:''}''预计 demo1.cpp第235行} // ------------------------------------------ ------------------- //在屏幕上绘制所有精灵 void CDemo1: :drawSprites() { for(int i = 0;我< m_sprite.getSize(); i ++) m_sprite [i] - > draw(); } // ------ -------------------------------------------------- ----- //移动所有精灵 void CDemo1 :: moveSprites() { gsCRect screen_rect = m_screen.getRect(); //这基本上会将每个精灵移动到屏幕上 //如果精灵离开屏幕它被包裹 //到底部 for(int i = 0; i< m_sprite.getSize (); i ++){ m_sprite [i] - > move(gsCPoint(0, - ((i& 3)+ 1))); gsCRect sprite_rect = m_sprite [i] - > getRect(); if(!(sprite_rect.overlaps(screen_rect))) m_sprite [i] - > move(gsCPoint(0,m_screen.getSize()。getY()+ m_image.getSize()。getY())); } } } // ------------- ------------------------------------------------ 这看起来很糟糕我已经失去了垫子,但源是一个 mag yo want the 4 for pages of code?they wont fit here but here goes. 1)Error : undefined identifier ''DIK_OEM_102''gs_keycodes.h line 106 gsKEY_OEM_102 = DIK_OEM_102, code= gsKEY_OEM_102 = DIK_OEM_102, 2)Error : undefined identifier ''DIK_PAUSE''gs_keycodes.h line 114 gsKEY_PAUSE = DIK_PAUSE, code= gsKEY_PAUSE = DIK_PAUSE,3)Error : '';'' expectedgs_scoretable.h line 23 const Int gsSCORE_NAME_SIZE=3; code=//------------------------------------------------------------- const Int gsSCORE_NAME_SIZE=3; //-------------------------------------------------------------4)Error : undefined identifier ''gsSCORE_NAME_SIZE''gs_scoretable.h line 30 char m_name[gsSCORE_NAME_SIZE]; code=//------------------------------------------------------------- struct gsScoreItem{int m_score;char m_name[gsSCORE_NAME_SIZE];}; //------------------------------------------------------------- 5)Error : '';'' expectedgs_soundsystem.h line 24 Class gsCSoundSystem : public gsCObject6)Error : declaration syntax errorgs_soundsystem.h line 26 private:7)Error : declaration syntax errorgs_soundsystem.h line 33 public:8)Warning : implicit ''int'' is no longer supported in C++gs_soundsystem.h line 34 gsCSoundSystem()9)Error : '';'' expectedgs_soundsystem.h line 35 gsCSoundSystem(); code=//------------------------------------------------------------- Class gsCSoundSystem : public gsCObject private:bool m_active;gsCList<gsCSample *> m_sample_list;gsCList<gsCMusic *> m_music_list; gsCMusic *m_current_music; public:gsCSoundSystem()gsCSoundSystem(); bool create();bool destroy(); bool isActive(); void clearMusicList();bool addMusic(const char *filename);int getNumberOfMusics();bool playMusic(int index);void stopMusic();bool isMusicFinished(); void clearSampleList();bool addSample(const char *filename);int getNumberOfSamples();bool playSample(int index,int panning = 0);void stopSamples(); void setVolume(int music_percent,int sample_percent);} //------------------------------------------------------------ 10)Error : declaration syntax errorgs_sprite.h line 66 inline void gsCSprite::setActive(bool state)code = //------------------------------------------------------------- inline void gsCSprite::setActive(bool state){m_active = state;} //-------------------------------------------------------------11)Error : ''}'' expecteddemo1.cpp line 235 } //-------------------------------------------------------------// Draw all the sprites on screen void CDemo1::drawSprites(){for (int i = 0; i < m_sprite.getSize(); i++)m_sprite[i]->draw();} //-------------------------------------------------------------// Move all sprites void CDemo1::moveSprites(){gsCRect screen_rect = m_screen.getRect(); // this basically moves each sprite up the screen // if the sprite goes off the screen it''s wrapped// around to the bottom for (int i = 0; i < m_sprite.getSize(); i++) { m_sprite[i]->move(gsCPoint(0,-((i & 3) + 1))); gsCRect sprite_rect = m_sprite[i]->getRect(); if (!(sprite_rect.overlaps(screen_rect)))m_sprite[i]->move(gsCPoint(0,m_screen.getSize().getY() +m_image.getSize().getY()));}}} //-------------------------------------------------------------this looks bad cus i have lost the format but the source was givenaway on amag 这篇关于Xenon 2000项目pcf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-26 18:55