蛇游戏问题 [英] Snake Game problem
问题描述
我写了一个蛇游戏。游戏中有2个级别(我是
完成了第1级)。它可以在没有问题的情况下在VC ++中运行,但是当我在开发C ++ 4.9.9.2上运行它时,它无法运行。我想在Dev C ++中而不是在VC ++中练习我的
编程。我现在该怎么办?
游戏:
---用彩色控制台窗口写一个蛇游戏。
1 - 玩家游戏。玩家使用4个箭头键来操作
运动
来追逐和吃尽可能多的食物(#)。具有不同颜色的食物
颜色具有
分数。当蛇击中自己或玩家击中时,游戏将结束
ESC键。
-----使用链接列表是必须的。
谢谢!
I have written a snake game. There are 2 levels in the game(I
finished 1st level). It can run in VC++ without problem but, when I
run it on the dev C++ 4.9.9.2, it cannot run. I want to practice my
programming in Dev C++ rather than in VC++. What can I do now?
The Game:
--- writing a snake game using color console window.
1-player game. The player makes use of 4 arrow keys to operate the
movement
to chase and eat as much food (#) as possible. Food with a different
color has
score. The game will end when the snake hits itself or the player hits
ESC key.
-----Use link list is a must.
Thanks!
推荐答案
6月10日上午9:50,foolsmart2 ... @ gmail.com
< foolsmart2 ... @ gmail.comwrote:
On Jun 10, 9:50 am, "foolsmart2...@gmail.com"
<foolsmart2...@gmail.comwrote:
我写了一个蛇游戏。游戏中有2个级别(我是
完成了第1级)。它可以在没有问题的情况下在VC ++中运行,但是当我在开发C ++ 4.9.9.2上运行它时,它无法运行。我想在Dev C ++中而不是在VC ++中练习我的
编程。我现在该怎么办?
游戏:
---用彩色控制台窗口写一个蛇游戏。
1 - 玩家游戏。玩家使用4个箭头键来操作
运动
来追逐和吃尽可能多的食物(#)。具有不同颜色的食物
颜色具有
分数。当蛇击中自己或玩家击中时,游戏将结束
ESC键。
-----使用链接列表是必须的。
谢谢!
I have written a snake game. There are 2 levels in the game(I
finished 1st level). It can run in VC++ without problem but, when I
run it on the dev C++ 4.9.9.2, it cannot run. I want to practice my
programming in Dev C++ rather than in VC++. What can I do now?
The Game:
--- writing a snake game using color console window.
1-player game. The player makes use of 4 arrow keys to operate the
movement
to chase and eat as much food (#) as possible. Food with a different
color has
score. The game will end when the snake hits itself or the player hits
ESC key.
-----Use link list is a must.
Thanks!
您需要发布有关编译选项的更多信息以及在尝试使用Dev C ++编译时获得的
错误消息,更多帮助。
更多帮助。
单
You need to post more info regarding the compilation options and the
error messages you got when you tried to compile in Dev C++, to be of
more help.
Shan
sh ******* @ yahoo.com 写道:
sh*******@yahoo.com wrote:
6月10日,上午9:50,foolsmart2 ... @ gmail.com
< foolsmart2 ... @ gmail.comwrote:
On Jun 10, 9:50 am, "foolsmart2...@gmail.com"
<foolsmart2...@gmail.comwrote:
>我写了一个蛇游戏。游戏中有2个级别(我完成了第1级)。它可以在VC ++中运行而没有问题但是,当我在开发C ++ 4.9.9.2上运行它时,它无法运行。我想在Dev C ++中而不是在VC ++中练习我的编程。我现在该怎么办?
游戏:
---使用彩色控制台窗口编写蛇形游戏。
单人游戏。玩家使用4个箭头键来操作
运动来追逐和吃尽可能多的食物(#)。具有不同颜色的食物有
分数。当蛇击中自己或者玩家点击ESC键时游戏结束。
-----使用链接列表是必须的。
谢谢!
>I have written a snake game. There are 2 levels in the game(I
finished 1st level). It can run in VC++ without problem but, when I
run it on the dev C++ 4.9.9.2, it cannot run. I want to practice my
programming in Dev C++ rather than in VC++. What can I do now?
The Game:
--- writing a snake game using color console window.
1-player game. The player makes use of 4 arrow keys to operate the
movement
to chase and eat as much food (#) as possible. Food with a different
color has
score. The game will end when the snake hits itself or the player hits
ESC key.
-----Use link list is a must.
Thanks!
您需要发布有关编译选项的更多信息以及在尝试使用Dev C ++编译时获得的
错误消息,是
更多的帮助。
You need to post more info regarding the compilation options and the
error messages you got when you tried to compile in Dev C++, to be of
more help.
此外,OP应该在论坛中发布该额外信息
topical。特定编译器的编译选项和
平台特定库或技巧的怪癖(颜色控制台窗口所需,
,标准C ++不知道什么)不属于这里。
最好
Kai-Uwe Bux
Also, the OP should post that additional info in a forum where it is
topical. Compilation options of particular compilers and the quirks of
platform specific libraries or tricks (needed for color console windows, of
which standard C++ would not know anything) do not belong here.
Best
Kai-Uwe Bux
6月10日,12:50 * pm ,foolsmart2 ... @ gmail.com
< foolsmart2 ... @ gmail.comwrote:
On Jun 10, 12:50*pm, "foolsmart2...@gmail.com"
<foolsmart2...@gmail.comwrote:
我写的蛇游戏。 *游戏中有2个等级(我是
完成了第1级)。 *它可以在VC ++中运行而没有问题但是,当我在开发C ++ 4.9.9.2上运行它时,它无法运行。 * *我想在Dev C ++中而不是在VC ++中练习我的
编程。我现在该怎么办?
游戏:
---用彩色控制台窗口写一个蛇游戏。
1 - 玩家游戏。玩家使用4个箭头键来操作
运动
来追逐和吃尽可能多的食物(#)。具有不同颜色的食物
颜色具有
分数。当蛇击中自己或玩家击中时,游戏将结束
ESC键。
-----使用链接列表是必须的。
谢谢!
I have written a snake game. *There are 2 levels in the game(I
finished 1st level). * It can run in VC++ without problem but, when I
run it on the dev C++ 4.9.9.2, it cannot run. * *I want to practice my
programming in Dev C++ rather than in VC++. What can I do now?
The Game:
--- writing a snake game using color console window.
1-player game. The player makes use of 4 arrow keys to operate the
movement
to chase and eat as much food (#) as possible. Food with a different
color has
score. The game will end when the snake hits itself or the player hits
ESC key.
-----Use link list is a must.
Thanks!
由于该文件的代码非常多,我想我会用另一个
方法告诉你错误。但是现在,我在Dev C ++中遇到了问题,
这里是代码:
#include< iostream>
#include< iomanip>
#include< string>
使用命名空间std;
struct CarType {
string maker ;
int year;
浮动价格;
}
void getYourCar(CarType&汽车);
int main()
{
CarType myCar,yourCar;
myCar .make =" Mercedes";
myCar.year = 2008;
myCar.price = 556653;
getYourCar( yourCar);
cout<< 你的车是: << yourCar.maker<< endl;
cout<<固定<< showpoint<< setprecision(2)<<
"我将提供
Owing to the file is quite a lot of code, I think I will use another
method to tell you the error. But now, I suffer a problem in Dev C++,
here is the code:
#include<iostream>
#include<iomanip>
#include<string>
using namespace std;
struct CarType{
string maker;
int year;
float price;
}
void getYourCar(CarType & car);
int main()
{
CarType myCar, yourCar;
myCar.make = "Mercedes";
myCar.year = 2008;
myCar.price = 556653;
getYourCar(yourCar);
cout << "Your car is a: " << yourCar.maker << endl;
cout << fixed << showpoint << setprecision(2) <<
"I will offer
这篇关于蛇游戏问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!