Crossin的编程教室

标题: 我第一个C语言游戏-控制台下可玩版贪吃蛇 [打印本页]

作者: dark    时间: 2013-9-10 18:21
标题: 我第一个C语言游戏-控制台下可玩版贪吃蛇
大二的时候,某天在寝室无聊,就编了这个东西…来自娱自乐,权当分享下给大家哈哈

效果图:

QQ截图20130910181236.jpg
QQ截图20130910181257.jpg

源代码如下
canPlaySnake.zip (11.26 KB, 下载次数: 113)
作者: dark    时间: 2013-9-11 11:45
居然没有人下载~那楼主沙发怒顶……
作者: chris    时间: 2013-9-11 23:52
怒顶~~~~~我来下
作者: chris    时间: 2013-9-11 23:52
怒顶~~~~~我来下
作者: nemo    时间: 2013-10-2 02:14
怒顶美女,我下来研究研究
作者: βelιeφe    时间: 2013-10-8 15:41
楼主妹妹,最近有什么新作品吗
作者: HTDI    时间: 2013-10-15 17:34
来顶顶
作者: onlyforstop    时间: 2013-11-3 20:19
一直都很敬佩用c写游戏高手
作者: scz_000    时间: 2013-12-6 08:44
赞~牛人
作者: 今天手气不错啊    时间: 2013-12-20 09:51
出了一大堆错误。。。
--------------------Configuration: canPlaySnake - Win32 Debug--------------------
Compiling...
canPlaySnake.c
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(14) : error C2065: 'N' : undeclared identifier
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(14) : error C2057: expected constant expression
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(14) : error C2466: cannot allocate an array of constant size 0
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(14) : error C2057: expected constant expression
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(14) : error C2466: cannot allocate an array of constant size 0
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(14) : error C2087: '<Unknown>' : missing subscript
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(62) : error C2065: 'snake_speed' : undeclared identifier
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(116) : error C2065: 'snake_body_coord_y' : undeclared identifier
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(116) : error C2109: subscript requires array or pointer type
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(116) : error C2065: 'snake_body_coord_x' : undeclared identifier
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(116) : error C2109: subscript requires array or pointer type
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(123) : error C2109: subscript requires array or pointer type
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(123) : error C2109: subscript requires array or pointer type
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(125) : error C2109: subscript requires array or pointer type
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(125) : error C2109: subscript requires array or pointer type
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(126) : error C2109: subscript requires array or pointer type
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(126) : error C2109: subscript requires array or pointer type
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(133) : error C2109: subscript requires array or pointer type
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(133) : error C2109: subscript requires array or pointer type
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(133) : error C2106: '=' : left operand must be l-value
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(134) : error C2109: subscript requires array or pointer type
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(134) : error C2109: subscript requires array or pointer type
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(134) : error C2106: '=' : left operand must be l-value
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(138) : error C2085: 'seed' : not in formal parameter list
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(139) : error C2061: syntax error : identifier 'seed'
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(140) : error C2059: syntax error : 'return'
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(141) : error C2059: syntax error : '}'
c:\documents and settings\administrator\my documents\downloads\canplaysnake\canplaysnake.c(155) : fatal error C1506: unrecoverable block scoping error
执行 cl.exe 时出错.

canPlaySnake.exe - 1 error(s), 0 warning(s)

作者: liu-pengfei    时间: 2014-9-21 19:11
这么晚了,我也要顶一下。
作者: xsky    时间: 2017-4-24 12:04
为什么注释全是乱码
作者: crossin先生    时间: 2017-4-24 23:55
xsky 发表于 2017-4-24 12:04
为什么注释全是乱码

应该是系统不同或者文件编码不同造成的,找一个可以设置编码的编辑器看看




欢迎光临 Crossin的编程教室 (https://bbs.crossincode.com/) Powered by Discuz! X2.5