上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 44 下一页
摘要: //键盘输入若干个整数,按输入数据逆序建立一个带头结点的单链表(头插入创建单链表) #include<stdio.h> #include<stdlib.h> typedef struct Link { int data; struct Link* next; }link; //头插入的方式初始化链表 阅读全文
posted @ 2020-04-14 13:48 shanlu 阅读(3776) 评论(0) 推荐(0) 编辑
摘要: 有一个不带头结点的单链表L(至少有1个结点),第一个结点指针为head,编写算法将L逆置,即最后一个结点变成第一个结点,倒数第二个结点变成第二个结点,如此等等。 #include<stdio.h> #include<stdlib.h> //链表中节点的结构 typedef struct Link { 阅读全文
posted @ 2020-04-14 10:52 shanlu 阅读(482) 评论(0) 推荐(0) 编辑
摘要: 1,定义链队列结点结构,链队列结构,初始化空链队列 #include<stdio.h> #include<stdlib.h> //定义链队列结点结构 typedef struct LinkQueueNode { int data; struct LinkQueueNode* next; }LQNod 阅读全文
posted @ 2020-04-01 11:30 shanlu 阅读(118) 评论(0) 推荐(0) 编辑
摘要: //循环队列 #include<stdio.h> #include<stdlib.h> #define Capacity 6 typedef struct Queue { int data[Capacity]; int front; //队头指针 int rear; //队尾指针 }queue; q 阅读全文
posted @ 2020-03-29 21:56 shanlu 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 1,定义队列,并初始化队列(赋予一个队列10个元素,元素赋值为 -1 ) //顺序队列,定义队列并初始化队列,将队列中的元素初始化为-1 #include<stdio.h> #include<stdlib.h> #define Capacity 10 typedef struct Queue { i 阅读全文
posted @ 2020-03-29 21:38 shanlu 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 触摸反馈 小程序的view容器组件和button组件提供了hover-class属性,触摸时会往该组件加上对应的class改变组件的样式 <button hover-class="hover">点击button</button> <button hover-class="hover">点击view< 阅读全文
posted @ 2020-03-25 15:12 shanlu 阅读(556) 评论(0) 推荐(0) 编辑
摘要: <view id="tapTest" data-hi="WeChat" bindtap="tapName">bindtap</view> Page({ tapName:function(event){ console.log(event); }, }) 以 bindtap 事件为例,事件是通过 bi 阅读全文
posted @ 2020-03-25 13:27 shanlu 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 1,定义一个链栈,并压入一个元素 1 //定义一个链栈,并压入一个元素 2 3 /* 4 #include<stdio.h> 5 #include<stdlib.h> 6 7 //定义链栈结点结构 8 typedef struct LinkStackNode { 9 int data; 10 str 阅读全文
posted @ 2020-03-24 23:31 shanlu 阅读(127) 评论(0) 推荐(0) 编辑
摘要: WXML模板使用 {{ }} 的语法绑定一个 msg 的变量 <view>{{msg}}</view> JS 脚本中使用 this.setData 方法把 msg 字段设置成“ Hello World ” 。 总结: ①渲染层和数据相关(数据驱动) ②逻辑层负责产生、处理数据 ③逻辑层通过 Page 阅读全文
posted @ 2020-03-24 15:47 shanlu 阅读(141) 评论(0) 推荐(0) 编辑
摘要: WXML 提供两种文件引用方式import和include。 import 可以在该文件中使用目标文件定义的 template: 建立一个 template 目录,在 template.wxml 中定义一个 name=student 的模板: <!--pages/template/template. 阅读全文
posted @ 2020-03-24 14:04 shanlu 阅读(768) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 44 下一页