- 博客(10)
- 资源 (1)
- 收藏
- 关注
原创 消息队列
#include <sys/types.h>#include <sys/msg.h>#include <unistd.h>#include <stdio.h>#include <stdlib.h>#include <sys/ipc.h>#include <string.h>#include <signal.h>struct msg_buf { int mtype
2016-11-29 22:49:33 195
原创 消息队列读操作
#include <stdio.h>#include <sys/msg.h>#include <sys/types.h>#include <sys/ipc.h>#include <stdlib.h>#define BUFSZ 4096struct msg{ long msg_types; char msg_buf[512];};int main(int argc,char
2016-11-27 23:08:07 328
原创 共享内存的读写
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <sys/ipc.h>#include <sys/shm.h>#define BUFFER_SIZE 2048int main(){ pid_t pid; int shmid; char *s
2016-11-26 20:21:53 1318
原创 有名管道的写操作
#include #include #include #include #include #include #include #define FIFO_SEVER "/tmp/fifosever"int main(int argc,char *argv[]){ int fd; char w_buf[4096*2];
2016-11-23 17:39:41 268
原创 fifo有名管道的读操作
#include #include #include #include #include #include #include #define FIFO_SEVER "/tmp/fifosever"int main(int argc,char **argv){ char r_buf[4096*2]; int fd; i
2016-11-21 21:03:20 307
原创 数据库遍历
int inquire_nocb(sqlite3 *db){int nrow,ncolumn;char **azresult;char *sql;char *errmsg = NULL;int i;sql = "select * from txl;";if(sqlite3_get_table(db,sql,&azresult,&nrow,&ncolu
2016-11-18 21:57:50 823
原创 关于feof函数多读一次的问题
在完成通信录的过程中总是多读出一个0,对此我进行了多次调试。下面是成功的代码void load_txl(Link *head){Link temp = *head;Link newnode = NULL;FILE *fp;int i;if((fp = fopen("txl.txt","r")) == NULL){printf("打开失败!\n");
2016-11-16 19:39:11 1939
原创 数据库显示
int inquire_nocb(sqlite3 *db){int nrow,ncolumn;char **azresult;char *sql;char *errmsg = NULL;int i;sql = "select * from mytable;";if(sqlite3_get_table(db,sql,&azresult,&nrow,&n
2016-11-14 22:35:10 293
原创 threehello
#include #include #include #include #include #include #include #include #define MAX 100int read_line(int fd,char *buf,int count){int i;char ch;for(i = 0;i {if((re
2016-11-12 22:08:48 214
原创 程序功能:建立一个带有头结点的单向链表,并将存储在数组中的字符依次转储到链表的各个结点中。
#include #include struct node{int num;struct node * next;};typedef struct node Node;typedef struct node * Link;void creat_link(Link * head){*head = NULL;}//ma
2016-11-06 20:31:22 3982
TR069协议说明文档
2018-09-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人