摘要: 未初始化的指针可以指向任何地方,空指针表示未分配、不指向任何有意义的地方,定义指针变量,一定要记得指针初始化,分配内存,最后要释放指针,以防内存泄漏int *p;p=(int *)malloc(sizeof(int));//分配不成功将返回空指针free(p);p=NULL;//指针释放后,是释放指 阅读全文
posted @ 2019-07-12 21:03 BingoC 阅读(116) 评论(0) 推荐(0) 编辑
摘要: a / i 进入编辑,ESC退出编辑 u 撤销 j,k,l,h光标移动 光标移动到行首A,光标移动到行尾I :q退出 :q!强制退出不保存 :wq保存退出 x删去当前字符; 3x 删去3个字母; dw 删去单词; 3dw 删去3个字母; dd删去当前行 3dd 删去3行; d$ 删去光标至行尾的内容 阅读全文
posted @ 2019-07-12 21:03 BingoC 阅读(219) 评论(0) 推荐(0) 编辑
摘要: ffmpeg convert jpg to yuv420sp(nv12)ffmpeg -i 1.jpg -s 1920x1080 -pix_fmt nv12 1.yuvffmpeg -i Vtrailer.mp4 -vcodec copy -an Vtrailer.aviffmpeg -i Vtra 阅读全文
posted @ 2019-07-12 21:02 BingoC 阅读(3771) 评论(0) 推荐(0) 编辑
摘要: #include<pthread.h>linux 多线程编程: pthread_t 线程名 pthread_create(pthread * thread, const pthread_attr_t *attr,void *(*start_routine) (void *), void *arg); 阅读全文
posted @ 2019-07-12 21:02 BingoC 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Windows下使用git: ubuntu下安装git Clone 项目 git clone [address] Git命令具体的使用,参考: https://git-scm.com/doc 下面是一些常用的命令: git add –A ./docs/ 向repo里添加 ./docs目录里的所有文件 阅读全文
posted @ 2019-07-12 21:02 BingoC 阅读(124) 评论(0) 推荐(0) 编辑
摘要: JANSSON 2.10编译:(for 2.11, skip step 1 & 2) Orcania库编译: CC=arm-none-linux-gnueabi-gcc LIBJANSSON_INCLUDE=../../../../include/jansson LIBJANSSON_LOCATIO 阅读全文
posted @ 2019-07-12 21:01 BingoC 阅读(746) 评论(0) 推荐(0) 编辑
摘要: makefile中: = 是最基本的赋值 := 是覆盖之前的值 ?= 是如果没有被赋值过就赋予等号后面的值 += 是添加等号后面的值 https://www.cnblogs.com/wanqieddy/archive/2011/09/21/2184257.html $(MAKE) -I 头文件路径 阅读全文
posted @ 2019-07-12 21:01 BingoC 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 定时器的设置: #include <signal.h> #include <sys/time.h> #include <stdio.h> int main(){ signal(SIGALRM,signal_hander); //设置SIGALRM信号处理函数 set_timer(); //调用这个函 阅读全文
posted @ 2019-07-12 21:01 BingoC 阅读(1399) 评论(0) 推荐(0) 编辑
摘要: //#if 0 #include <stdio.h>#include <unistd.h> /*progress为进度百分比,取值为0~100, last_char_count为上一次显示进度条时所用到的字符个数*/int display_progress(int progress, int las 阅读全文
posted @ 2019-07-12 21:00 BingoC 阅读(1111) 评论(0) 推荐(0) 编辑
摘要: 1.vi test.h test.c main.c 2.gcc -c test.c 3.ar rcs libtest.a test.o 静态rcs可换成-r/ gcc -shared -fPIC -o libtest.so test.o 动态 4.gcc -o main main.c -L. -lt 阅读全文
posted @ 2019-07-12 21:00 BingoC 阅读(474) 评论(0) 推荐(0) 编辑