- 博客(12)
- 问答 (3)
- 收藏
- 关注
原创 2021-11-15
QT QMessageBox添加中文时乱码QMessageBox::StandardButton reply; reply = QMessageBox::question(this, QString::fromLocal8Bit("操作提示"), QString::fromLocal8Bit("该用户已添加,是否继续添加"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
2021-11-15 13:47:59
226
原创 ubuntu设置win10共享文件夹
1.在关机模式下设置windows中的共享目录2.安装VMware Tools3.copy VMware tools压缩文件到临时目录。解压后,运行vmware-install.pl。一路回车一般情况下,cd 到/mnt/hgfs/share,就可以看到这些共享的文件...
2020-11-06 11:06:10
433
原创 _POSIX有名信号量
j#include <stdio.h>#include <sys/types.h>#include <sys/ipc.h>#include <sys/shm.h>#include <sys/sem.h>#include <fcntl.h>#include <sys/stat.h>#include <semaphore.h>#include <errno.h>#include <
2020-09-26 14:59:34
223
原创 udp服务器转发客户端消息
服务器#include <stdio.h>#include <stdlib.h>#include <strings.h>#include <string.h>#include <sys/types.h>#include <arpa/inet.h>#include <sys/socket.h>#include <unistd.h>#include <pthread.h>//设计一个
2020-09-24 15:10:11
565
原创 tcp文件传输
server#include <stdio.h> #include <sys/socket.h> #include <arpa/inet.h>#include <stdlib.h> #include <memory.h> #include <string.h>#include <unistd.h>#include <errno.h>#define BUFFER_SIZE 100*102
2020-09-22 19:43:41
281
原创 消息队列的基本使用
J#include <stdio.h>#include <sys/types.h>#include <sys/ipc.h>#include <errno.h>#include <sys/msg.h>#include <string.h>#define J2R 1L#define R2J 2L#define J2Z 3Lstruct msgbuf { long mtype; /* message
2020-09-21 20:04:40
136
原创 linux下的网络通信
服务器端#include <stdio.h>#include <sys/types.h> /* See NOTES */#include <sys/socket.h>#include <errno.h>#include <string.h>#include <netinet/in.h>#include <arpa/inet.h>#include <unistd.h>int m
2020-09-21 16:42:39
589
原创 共享内存的基本使用
共享内存#include <stdio.h>#include <sys/types.h>#include <sys/ipc.h>#include <errno.h>#include <sys/shm.h>#include <string.h>struct Stu{ int age; char name[20];};int main(int argc, char const *argv[]){ //1.获取
2020-09-19 16:43:30
221
原创 信号发送带复杂数据
父子进程间信号发送#include <stdio.h>#include <unistd.h>#include <errno.h>#include <signal.h>#include <string.h>#include <stdlib.h>//信息结构体struct Info{ char name[20]; int age; float score;};void func(int sig){ print
2020-09-19 14:29:42
97
原创 进程间的通信
进程间的通信#include <stdio.h>#include "myhead.h"void func(int sig){ printf("标准响应函数收到信号:%d\n",sig );}void act_func(int sig,siginfo_t *siginfo,void *ptr){ //如果是sigqueue函数方式的信号发送。那么我们是可以拿到数据的 if(siginfo->si_code == SI_QUEUE) { printf("获取到信号【
2020-09-19 13:54:30
79
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人