随笔分类 -  各种demo实现

各种用代码实现的程序
调用fork函数创建子进程, 并完成对子进程的回收,并输出回收进程的信息
摘要:1 //调用fork函数创建子进程, 并完成对子进程的回收,并输出回收进程的信息 2 #include <stdio.h> 3 #include <stdlib.h> 4 #include <string.h> 5 #include <sys/types.h> 6 #include <unistd. 阅读全文
posted @ 2020-12-23 13:06 Sna1lGo 阅读(466) 评论(0) 推荐(0)
C语言+easyX图形库的推箱子实现
摘要:main函数 #include<stdio.h> #include<stdlib.h> #include<conio.h> #include<windows.h> #include"box_1.h" #include<graphics.h> IMAGE images[7];//存储6个图片,用图形库 阅读全文
posted @ 2020-11-19 20:42 Sna1lGo 阅读(656) 评论(0) 推荐(0)
纯C语言贪吃蛇demo
摘要:main.c 1 //纯C语言贪吃蛇 2 #define _CRT_SECURE_NO_WARNINGS 3 #include"snake.h" 4 #include<stdio.h> 5 int main() 6 { 7 //去除光标 8 CONSOLE_CURSOR_INFO test1; 9 阅读全文
posted @ 2020-11-13 00:47 Sna1lGo 阅读(218) 评论(0) 推荐(0)
C语言与文件相关的demo
摘要:复制文件 1 //任意文件复制demo 2 3 #define _CRT_SECURE_NO_WARNINGS 4 #include<stdio.h> 5 #include<stdlib.h> 6 #include<string.h> 7 #include<time.h> 8 9 void inpu 阅读全文
posted @ 2020-11-10 01:27 Sna1lGo 阅读(173) 评论(0) 推荐(0)
C语言实现-读取文件的四则运算并计算
摘要://文件版的四则运算 #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<string.h> //进行文件四则运算的写入 void write_file() { FILE* fp = NULL; 阅读全文
posted @ 2020-11-02 19:06 Sna1lGo 阅读(1005) 评论(0) 推荐(0)
C语言文件操作-按行读写文件
摘要:1 //按行读写文件 2 #define _CRT_SECURE_NO_WARNINGS 3 #include<stdio.h> 4 #include<stdlib.h> 5 #include<string.h> 6 7 //获取键盘输入,写入文件 8 void Get_stdin_Write_Fi 阅读全文
posted @ 2020-11-02 19:03 Sna1lGo 阅读(2776) 评论(0) 推荐(0)
C语言文件的打开和关闭
摘要:1 //文件的打开和关闭 2 #define _CRT_SECURE_NO_WARNINGS 3 #include<stdio.h> 4 #include<stdlib.h> 5 #include<string.h> 6 int Only_Read_file(FILE* fp) 7 { 8 //以只 阅读全文
posted @ 2020-11-02 18:59 Sna1lGo 阅读(451) 评论(0) 推荐(0)
C++实现雅克比行列式
摘要://c++实现雅克比迭代式 #include<iostream> #include<iomanip> #include<string> #include<vector> using namespace std; //函数求数组中的最大值 double MaxOfList(vector<double> 阅读全文
posted @ 2020-11-02 18:57 Sna1lGo 阅读(1120) 评论(0) 推荐(0)
C语言-按字符读写文件demo程序
摘要:采用的是vs2019IDE来处理 1 //按字符读写文件 2 3 #define _CRT_SECURE_NO_WARNINGS 4 #include<stdio.h> 5 #include<stdlib.h> 6 #include<string.h> 7 //按单个字符写文件 8 int Writ 阅读全文
posted @ 2020-11-02 18:56 Sna1lGo 阅读(430) 评论(0) 推荐(0)