摘要: #include <string.h> #include <errno.h> #include <arpa/inet.h> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #define MAXLINE 1024 i 阅读全文
posted @ 2024-01-25 15:21 东宫得臣 阅读(10) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <arpa/inet.h> #define MAXBUF 1024 int main(int argc, char **arg 阅读全文
posted @ 2024-01-23 16:52 东宫得臣 阅读(14) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> void inplace_swap(int *x, int *y) { printf(" \n"); printf("x = %d, y = %d\n", *x, *y); *y = *x ^ *y; printf("x = %d, y = %d\n", *x, 阅读全文
posted @ 2024-01-16 18:40 东宫得臣 阅读(5) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stack> int main() { std::stack<char> s; int num, mod; printf("输入十进制数: \n"); scanf("%d", &num); printf("num: %d\n", num); 阅读全文
posted @ 2024-01-16 11:47 东宫得臣 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 之前一直以为,touch命令的原本意图是创建文件,这也是我们运行touch的大部分场景。 今天,看到了官方手册页的描述,touch - change file timestamps,刷新了认知。 原来touch是修改文件的时间戳的。 Update the access and modificatio 阅读全文
posted @ 2023-04-23 17:07 东宫得臣 阅读(16) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <errno.h> #include <string.h> c 阅读全文
posted @ 2023-04-06 22:48 东宫得臣 阅读(16) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <errno.h> #include <string.h> # 阅读全文
posted @ 2023-04-06 22:45 东宫得臣 阅读(29) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <fcntl.h> #include <errno.h> #include <string.h> #include <semaphore.h> #include <stdlib.h> #include <sys/mman.h> const in 阅读全文
posted @ 2022-10-14 16:47 东宫得臣 阅读(14) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <fcntl.h> #include <errno.h> #include <string.h> #include <semaphore.h> #include <stdlib.h> #include <sys/mman.h> #define 阅读全文
posted @ 2022-10-13 13:46 东宫得臣 阅读(16) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <fcntl.h> #include <stdlib.h> #include <pthread.h> #include <semaphore.h> #define min(a,b) ((a)<(b)?(a):(b)) #define NBUFF 阅读全文
posted @ 2022-10-12 15:03 东宫得臣 阅读(18) 评论(0) 推荐(0) 编辑