![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言学习
我是东山啊\n
这个作者很懒,什么都没留下…
展开
-
标准C语言总结
原创 2021-08-29 21:16:56 · 76 阅读 · 0 评论 -
数据结构总结
原创 2021-08-29 11:08:10 · 73 阅读 · 0 评论 -
2021-08-15
一、什么是数据结构1、数据结构的起源1968年,美国高德纳教授,《计算机程序设计艺术》的第一卷《基本算法》的出版,开创了数据结构和算法的先河。数据结构是一门研究数据之间关系和操作的学科,而非计算方法。数据结构+算法=程序,沃斯凭借这个观点写的论文获得了图灵奖,这句话展示了整个程序的本质。2、数据结构的基本概念数据:所以能够输入到计算机中,能够被程序处理的描述客观事物的符号。数据项:有独立含义的最小单位,也叫做域。【结构的成员项】数据元素:组成数据,有一定意义的基本单位,也叫做节点、记录。数据原创 2021-08-15 08:48:51 · 111 阅读 · 0 评论 -
2021-07-31
运行的时候发现有这个错误useless storage class specifier in empty declaration后面发现是因为用了static 的原因,static只能用来声明变量,拿它来声明结构体就会报错原创 2021-07-31 15:04:32 · 379 阅读 · 0 评论 -
C语言简易2048小游戏
本程序采用多文件编程其中tools.c里面是游戏中需要用到的工具函数direction.c里是控制方向的函数game2048.c中是将所有其他函数整合各文件及代码如下:如有错误请大佬指正//MakefileOBJ=direction.o game2048.o main.o tools.oSTD=-std=gnu99CC=gccBIN=game2048.binFLAG=-Wall -Werror -DDEBUGall:$(OBJ) $(CC) -o $(BIN) $(OBJ)m原创 2021-07-29 20:59:31 · 232 阅读 · 0 评论 -
C语言简易通讯录
#include <stdio.h>#include <stdlib.h>#include <getch.h>#include <string.h>static char name[50][20] = {}; //姓名static char sex[50] = {}; //性别static char tel[50][13] = {}; //电话static int cnt = 0; //联系人个数//任意键继续void a原创 2021-07-27 19:50:28 · 84 阅读 · 0 评论 -
C语言五子棋
#include <stdio.h>#include <getch.h>#include <stdbool.h>#include <stdlib.h>// 定义棋盘char board[15][15];// 角色char role = '@';// 落子坐标char key_x = 7,key_y = 7;void init_board(void){ for(int i=0; i<15; i++) { for(int j原创 2021-07-19 20:03:47 · 127 阅读 · 0 评论 -
C语言推箱子小游戏
//这个是把之前那个的多余代码删除了#include <stdio.h>#include <stdlib.h>#include <getch.h>int main(){//定义一个88的二位数组作为地图//0对应" “代表路,1对应”#“代表墙,2对应”@“代表人,3对应O代表目标点,4对应B代表箱子int box[8][8]={{0,0,1,1,1,1,0,0},{0,0,1,3,3,1,0,0},{0,1,1,0,3,1,1,0},{0,1,0原创 2021-07-14 19:46:14 · 88 阅读 · 0 评论 -
C语言推箱子小游戏
#include <stdio.h>#include <stdlib.h>#include <getch.h>int main(){//定义一个8*8的二位数组作为地图//0对应" “代表路,1对应”#“代表墙,2对应”@“代表人,3对应O代表目标点,4对应B代表箱子int box[8][8]={{0,0,1,1,1,1,0,0},{0,0,1,3,3,1,0,0},{0,1,1,0,3,1,1,0},{0,1,0,0,4,3,1,0},{1,1,原创 2021-07-14 10:55:32 · 139 阅读 · 0 评论