随笔分类 - 程序设计
摘要:设计当然最重要,但是不一定要先于代码完成。 代码和设计可以同步重构。 成果不经过实践的检验的设计和代码都是烂的。
阅读全文
摘要:方便接收到数据,不需要解析,直接就可以知道数据包的物理位置信息,并得到相关变量的值。 音视频传输中使用这个数据结构也是异常好用 typedef union __dataPacketHead { unsigned char buffer[sizecmd]; struct { unsigned char
阅读全文
摘要:使用git checkout -b xxx 建立一个分支 各种操作 各种训练
阅读全文
摘要:#include <stdio.h> int main() { int a = 2 , b = 5; a++; b++; printf(" a is %d b is %d a+b %d\n",a,b,a+b); while(1); return 0; }
阅读全文
摘要:#include <windows.h> #include <stdio.h> int main() { char test_Character = '1'; char test_Digital = '\1'; { printf("test is %d\n", test_Character); pr
阅读全文
摘要:都是指针变量,常用的改变指针变量指向那个值,一级指针改变变量的值 。 二级指针改变变量的值,不过是地址。 相同点:本身指针的地址是没有改变的。
阅读全文
摘要:while (1) { for (int i = 0; i < sizeof(DataStuct_Aggregation) / sizeof(char*);printf("数据结构之集合结构\n")) { } }
阅读全文
摘要:// windows_play.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <Windows.h> #include <MMSystem.h> #include <map> //4行2列 static int signal_energy[
阅读全文
摘要:#include <windows.h> int main() { while (1) { #if 0 Beep(523, 200); Beep(523, 200); Beep(578, 400); Beep(523, 400); Beep(698, 400); Beep(659, 800); Be
阅读全文
摘要:#include <unistd.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> #include <sys/types.h> #incl
阅读全文
摘要:while (1) { printf("printf is %p\n",printf); printf("gpio_uninit is %p\n", gpio_uninit); usleep(200000); }
阅读全文
摘要:Segmentation fault (1) 函数没有实现,只声明了,程序里面调用了,编译器竟然不报警告,我擦。 一跑到这里,立马软件崩溃,牛逼的编译器。
阅读全文
摘要:静态全局变量得初始化0; #include "common.h" #include <stdio.h> #include <stdlib.h> #include <math.h> #define PI (3.141592) static float test_equation = 0; static
阅读全文
摘要:#include "common.h" #include <stdio.h> #include <stdlib.h> #include <math.h> static float test_equation = 0; static char letter_A = '\r'; int main() {
阅读全文
摘要:带有浮点数,默认会转换为double类型存储。 #include "common.h" #include <stdio.h> #include <stdlib.h> #include <math.h> static float test_equation = 0; int main() { //只有
阅读全文

浙公网安备 33010602011771号