摘要: // Queue.cpp : 定义控制台应用程序的入口点。 #include "stdafx.h" #include <stdio.h> #include <string.h> // 队列是现实生活中理想模型一种 忽略很多细节 但即使这样 依然很有用 // Task:实现一个数据队列 数组实现 任务 阅读全文
posted @ 2020-04-06 22:10 卷哭你 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 道生一,一生二,二生三,三生万物 阅读全文
posted @ 2020-04-06 18:45 卷哭你 阅读(88) 评论(0) 推荐(0) 编辑
摘要: Visual studio调试: 定位代码 缩小调试范围 打断点 不断继续run 查看需要变量值与自己预期结果 判断哪里问题 #include "stdafx.h" #include <stdio.h> #include <string.h> const char* str[] = { "Hello 阅读全文
posted @ 2020-04-06 16:59 卷哭你 阅读(820) 评论(0) 推荐(0) 编辑
摘要: 字符串数组是指针数组,需要使用二级指针 #include "stdafx.h" #include <stdio.h> #include <string.h> const char* str[] = { "Hello","abc","applef","man","C程序设计","指针数组" }; co 阅读全文
posted @ 2020-04-06 15:47 卷哭你 阅读(2035) 评论(0) 推荐(0) 编辑
摘要: http://www.tiaozhanbei.net/focus 阅读全文
posted @ 2020-04-06 13:17 卷哭你 阅读(79) 评论(0) 推荐(0) 编辑
摘要: (1) 线程系统的三个基本要素:执行环境,调度,同步。 同步: 使用互斥量来保护共享数据,使用条件变量来通信,使用条件变量来通信,其他同步机制,如信号量管道和消息队列。互斥量允许线程在访问共享数据 锁定他,以避免其他线程干扰。条件变量允许线程等待共享数据到达某个期望的状态。(队列非空或者资源可用) 阅读全文
posted @ 2020-04-06 11:53 卷哭你 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 使用c库操作文件 #include "stdafx.h" #include <stdio.h> #include <pthread.h> #include <assert.h> #include <windows.h> #include <string.h> static void* Functio 阅读全文
posted @ 2020-04-06 11:30 卷哭你 阅读(556) 评论(0) 推荐(0) 编辑