摘要: #include <iostream> #include <stdlib.h> #include <stdbool.h> using namespace std; //结点 class Node { public: int data; Node* next; Node(int d) { data = 阅读全文
posted @ 2018-08-09 16:46 gaozhengkai 阅读(195) 评论(0) 推荐(0) 编辑
摘要: //五个哲学家围坐在一起,两人之间都放有一个叉子,意大利面需要2个叉子吃,哲学家吃饭时候叉子只能拿左右手,哲学家除了吃饭时间其他时间都在思考 #include <stdio.h> #include <stdlib.h> #include <memory.h> #include <pthread.h> 阅读全文
posted @ 2018-08-07 13:43 gaozhengkai 阅读(1377) 评论(0) 推荐(0) 编辑
摘要: // C++年月日判断初步代码 #include <iostream> using namespace std; class Data { int year; int month; int day; public: //判断日期是否有效 bool data_check(int _year,int _ 阅读全文
posted @ 2018-08-07 11:26 gaozhengkai 阅读(1825) 评论(0) 推荐(0) 编辑
摘要: //简易ftp客户端#include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #includ 阅读全文
posted @ 2018-08-05 20:00 gaozhengkai 阅读(2552) 评论(2) 推荐(0) 编辑