資源簡介
k是發子彈的,
cmd 切換到源碼目錄,運行g dafeiji.cpp 即可在當前目錄生成a.exe,點擊該文件可直接打飛機游戲
代碼片段和文件信息
#include??
#include??
#include??
#include
#include
#include??
#include?
#include??
using?namespace?std;??
??
/*===============?all?the?structures?===============*/??
??
typedef?struct?frame??
{??
????COORD?position[2];??
????int?flag;??
}frame;??
??
??
/*===============?all?the?functions?===============*/??
??
void?SetPos(COORD?a)//?set?cursor???
{??
????HANDLE?out=GetStdHandle(STD_OUTPUT_HANDLE);??
????SetConsoleCursorPosition(out?a);??
}??
??
void?SetPos(int?i?int?j)//?set?cursor??
{??
????COORD?pos={i?j};??
????SetPos(pos);??
}??
??
void?HideCursor()??
{??
????CONSOLE_CURSOR_INFO?cursor_info?=?{1?0};???
????SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE)?&cursor_info)
- 上一篇:c++ 飛揚的小鳥 小游戲
- 下一篇:c++ 坦克大戰 小游戲源碼(tc庫)
評論
共有 條評論