随笔分类 - 实验楼
实验楼里的项目
摘要:BMP(Bitmap-File)图像文件,又叫位图文件,是Windows采用的图形文件格式,在Windows环境下运行的所有图像处理软件都支持BMP图像文件格式。Windows系统内部个图像绘制操作以BMP为基础的。一个BMP文件由四个部分组成。 l 位图文件头 l 位图信息段 l 调色板 l 位图
阅读全文
摘要:#include #include #include #include #include #define ONE_SECOND 1000000 #define RANGE 10 #define PERIOD 2 #define NUM_THREADS 4 typedef struct { int *carpark; //用一个数组来模拟停车场停车位 int cap...
阅读全文
摘要:#include <stdio.h> #include <pthread.h> #include <stdlib.h> #include <string.h> /* 声明变量 */ int array_length, file_length; int *array_master; FILE *freader; /* 用于从文件读取数据 */ int *read_file(char *fname)
阅读全文
摘要:#include<dirent.h> #include<limits.h> #include<sys/stat.h> #include<stdio.h> #include<unistd.h> #include<stdlib.h> #include<string.h> #define FTW_F 1 //标记非目录文件 #define FTW_D 2 //标记目录文件 #define FTW_DNR
阅读全文
摘要:main()函数先调用初始化init(),然后进入循环while()。循环主要三部分: 1.判断用户操作,如果是w或者是空格键被按下,bird就向上飞两行;如果按下q键则退出游戏;z键暂停游戏; 2.移动bird进行重绘 3.判断bird是否撞到柱子 init()函数首先初始化屏幕,调用了ncurs
阅读全文