上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 18 下一页
摘要: void chToInt(char t, unsigned int & tt){ switch (t) { case '0': tt = 0; break; case '1': tt = 1; break; case '2': tt = 2; break; case '3': tt = 3; bre 阅读全文
posted @ 2020-04-23 08:13 唯一诺 阅读(189) 评论(0) 推荐(0)
摘要: typedef struct DListElement_{ int data; struct DListElement_ *prev; struct DListElement_ *next; }DListElement; typedef struct DList_{ int size; DListE 阅读全文
posted @ 2020-04-17 10:16 唯一诺 阅读(124) 评论(0) 推荐(0)
摘要: 1.fork创建进程的使用 fork()返回值等于0时,表示创建子进程; fork()返回值大于0时,是主进程; #include<stdio.h> #include<stdlib.h> #include<sys/wait.h> #include<signal.h> void sig_handler 阅读全文
posted @ 2020-04-15 20:28 唯一诺 阅读(794) 评论(0) 推荐(0)
摘要: typedef struct test { char num[10]; double age; }; 1.基本概念 有四个概念需要理解:A、数据类型自身的对齐值: 指对该数据类型使用sizeof()操作符进行操作所得到的大小(单位,字节); 对于[unsigned] char类型的数据,其自身对齐值 阅读全文
posted @ 2020-04-14 15:58 唯一诺 阅读(1090) 评论(0) 推荐(0)
摘要: 1. 使用宏定义: #define SWAP(X, Y) (X) += (Y);(Y)=(X)-(Y);(X)=(X)-(Y); 2. 使用异或位操作符 int x = 21; int y = 12; x ^= y; y ^= x; x ^= y; #include <stdio.h> #inclu 阅读全文
posted @ 2020-04-13 08:42 唯一诺 阅读(447) 评论(0) 推荐(0)
摘要: 1.为什么这样定义编译时候会报错:error: multiple storage classes in declaration specifiers typedef static int INT32 百度搜到的答案:typedef是存储类的关键字,和auto、static、register一样是存储 阅读全文
posted @ 2020-04-09 20:08 唯一诺 阅读(1089) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdarg.h> typedef struct STest { char num; }stest_st, *stest_pst; int main(int argn ,char *argv[]) { const int iNum = 10; 阅读全文
posted @ 2020-04-09 19:36 唯一诺 阅读(333) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdarg.h> double testArgFunc(int num, ...) { // 创建一个参数列表 va_list valist; double sum = 0.0; // 为num个参数初始化valist va_start(v 阅读全文
posted @ 2020-04-01 11:17 唯一诺 阅读(173) 评论(0) 推荐(0)
摘要: 1.sizeof是什么时候编译?返回值类型; 2.函数入栈顺序? 3.位域的优缺点,以及是否具有可移植性; 4.复杂度计算? 5.预编译? 6.断言? 7.可变参数? 8.结构体变量是否可直接赋值使用,是否可以使用==做判断;两个结构体如何做比较?memcmp 9.cmake 10.gdb 手把手教 阅读全文
posted @ 2020-04-01 09:22 唯一诺 阅读(122) 评论(0) 推荐(0)
摘要: #make clean;make SUPPORT=-DWEIYOUQING make clean;make SUPPORT=TESTDEFINE #目标 TARGET = main #源代码文件路径 SRC_DIR := ./Src\ SRC_DIR := $(shell ls -R $(SRC_D 阅读全文
posted @ 2020-03-30 17:33 唯一诺 阅读(4022) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 18 下一页