上一页 1 ··· 69 70 71 72 73 74 75 76 77 ··· 121 下一页
摘要: 最近在STM的GPIO结构体定义中看到源代码的时候,顺便复习下结构体指针变量的定义及typedef 的使用。 1.结构体类型定义 定义方式1: 定义方式2: 以上两个定义方式是等价的,是将 *LinkList 定 义为 struct LNode 类型,即 LinkList 被定义为一个类型名。这样就 阅读全文
posted @ 2018-09-09 13:28 wdliming 阅读(9690) 评论(0) 推荐(0)
摘要: 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)
摘要: 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)
摘要: #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)
摘要: #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)
摘要: 如果两个指针指向同一个数组,它们就可以相减,其结果为两个指针之间的元素数目。 阅读全文
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 下一页