HGE学习笔记,显示图像与播放声音

#include "hge.h"#include "hgesprite.h"const int screen_width = 535;const int screen_height = 656;HGE *hge = NULL;hgeSprite *spr;//声明一个精灵类指针;HTEXTURE tex;//定义一个纹理对象;HEFFECT snd;//声音;//逻辑函数;bool FrameFunc(){ hge->Effect_PlayEx(snd,50); return false;}//绘制和渲染函数;bool RenderFunc(){ hge->Gfx_Be...
hge | 2012-04-07 12:26 | 阅读 1659 次 | 评论 0 条

LINK : fatal error LNK1104: cannot open file 'LIBC.lib'

在vs2008中有时候链接会出现这样的错误:LINK : fatal error LNK1104: cannot open file 'LIBC.lib'解决方法:在项目的属性中,选择linker->Command Line->additional options中添加/nodefaultlib:libc即可注意是linker中,不是C/C++中
coding | 2012-04-07 12:15 | 阅读 2638 次 | 评论 0 条

长度为n的字符串的逆序数

#include<iostream>using namespace std;int main(int argc, char *argv[]){ int n; while(cin>>n) { int count=0; char *str = new char[n]; cin>>str; for(int k=1; k<n; ++k) { char elem=str[k]; for(int j=(k-1); j!=(-1); --j) { ...
浮云 | 2011-08-23 23:59 | 阅读 716 次 | 评论 0 条

任务日志--运算符重载

为了领积分哈!随便贴一段代码哈,O(∩_∩)O~! #include<iostream>#include<string>using namespace std; class fraction; //const fraction operator=(const fraction &amp;f1,const fraction &amp;f2); const fraction operator+(const fraction &amp;f1,const fraction &amp;f2); const fraction operator-(const fract...
浮云 | 2011-06-27 08:59 | 阅读 661 次 | 评论 0 条
浏览5673次
最新评论