会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
记录点滴~
不积小流,无以成江海。编程改变我的思维。
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
69
70
71
72
73
74
75
76
77
···
121
下一页
2018年9月9日
结构体指针变量的定义
摘要: 最近在STM的GPIO结构体定义中看到源代码的时候,顺便复习下结构体指针变量的定义及typedef 的使用。 1.结构体类型定义 定义方式1: 定义方式2: 以上两个定义方式是等价的,是将 *LinkList 定 义为 struct LNode 类型,即 LinkList 被定义为一个类型名。这样就
阅读全文
posted @ 2018-09-09 13:28 wdliming
阅读(9690)
评论(0)
推荐(0)
2018年9月8日
数据结构——链表
摘要: 1 #include 2 #include 3 #include 4 5 struct node 6 { 7 int data; 8 struct node *pNext; 9 }; 10 11 //新建node 12 struct node * create_node(int data) 13 { 14 struc...
阅读全文
posted @ 2018-09-08 20:14 wdliming
阅读(242)
评论(0)
推荐(0)
链表——新建链表
摘要: #include #include #include struct node{ int data; struct node *pNext;};//新建nodestruct node * create_...
阅读全文
posted @ 2018-09-08 20:06 wdliming
阅读(191)
评论(0)
推荐(0)
2018年9月7日
结构体复制与赋值
摘要: 1 #include 2 #include 3 #include 4 5 int main(int argc, char* argv[]) 6 { 7 struct data 8 { 9 int i; 10 char c; 11 int j; 12 int arr[2]; 13 };...
阅读全文
posted @ 2018-09-07 21:50 wdliming
阅读(1369)
评论(0)
推荐(0)
结构体内存对齐——2
摘要: #include #include #include /* So, when you are working with image headers, binary headers, and network pac...
阅读全文
posted @ 2018-09-07 21:31 wdliming
阅读(127)
评论(0)
推荐(0)
结构体内存对齐_1
摘要: #include #include #include /* So, when you are working with image headers, binary headers, and network pac...
阅读全文
posted @ 2018-09-07 21:29 wdliming
阅读(128)
评论(0)
推荐(0)
结构体内存对齐
摘要: #include #include #include /* So, when you are working with image headers, binary headers, and network pac...
阅读全文
posted @ 2018-09-07 20:21 wdliming
阅读(124)
评论(0)
推荐(0)
二级指针与字符串数组
摘要: 程序源自《C指针:基本概念核心技术及最佳实践》第四章的字符串数组一节#include #include #include void freestrmemory(char** arr, int length);i...
阅读全文
posted @ 2018-09-07 19:12 wdliming
阅读(391)
评论(0)
推荐(0)
2018年9月4日
指针相减
摘要: 如果两个指针指向同一个数组,它们就可以相减,其结果为两个指针之间的元素数目。
阅读全文
posted @ 2018-09-04 20:15 wdliming
阅读(1065)
评论(2)
推荐(0)
统计一行字符中有多少个单词
摘要: #include //只能是单词之间一个空格int words(char string[]){ int result = 0, i = 0; while(string[i] != 0) { if(string...
阅读全文
posted @ 2018-09-04 20:13 wdliming
阅读(190)
评论(0)
推荐(0)
上一页
1
···
69
70
71
72
73
74
75
76
77
···
121
下一页
公告