摘要:
字符串数组是指针数组,需要使用二级指针 #include "stdafx.h" #include <stdio.h> #include <string.h> const char* str[] = { "Hello","abc","applef","man","C程序设计","指针数组" }; co 阅读全文
摘要:
http://www.tiaozhanbei.net/focus 阅读全文
摘要:
(1) 线程系统的三个基本要素:执行环境,调度,同步。 同步: 使用互斥量来保护共享数据,使用条件变量来通信,使用条件变量来通信,其他同步机制,如信号量管道和消息队列。互斥量允许线程在访问共享数据 锁定他,以避免其他线程干扰。条件变量允许线程等待共享数据到达某个期望的状态。(队列非空或者资源可用) 阅读全文
摘要:
使用c库操作文件 #include "stdafx.h" #include <stdio.h> #include <pthread.h> #include <assert.h> #include <windows.h> #include <string.h> static void* Functio 阅读全文