1、typedef struct 和struct 的区别 struct Studen1 { int ID; char name; }stu1; typedef struct Student2 { int ID; char name; }stu2; Student1是结构体的名字,stu1是一个变量, ...
分类:
其他好文 时间:
2020-06-28 19:03:14
阅读次数:
38
#include <windows.h> #define NUMLINES ((int)(sizeof devcaps / sizeof devcaps[0])) struct { int iIndex; TCHAR* szLabel; TCHAR* szDesc; } devcaps[] = { ...
分类:
其他好文 时间:
2020-06-28 18:21:44
阅读次数:
85
本文部分内容参考博客。点击链接可以查看原文。 1. 反射的概念 反射是指在运行时将类的属性、构造函数和方法等元素动态地映射成一个个对象。通过这些对象我们可以动态地生成对象实例,调用类的方法和更改类的属性值。 2. 使用场景 什么情况下运用JAVA反射呢?如果编译时根本无法预知对象和类可能属于哪些类, ...
分类:
编程语言 时间:
2020-06-28 13:25:10
阅读次数:
54
二叉排序树(BST) 二叉排序树,又称二叉查找树(BST) 左子树结点值<根节点值<右子树结点值 如果用中序遍历来遍历一棵二叉排序树的话,可以得到一个递增的有序数列 左根右 二叉排序树的查找 //二叉排序树结点 typedef struct BSTNode{ int key; struct BSTN ...
分类:
编程语言 时间:
2020-06-28 13:17:50
阅读次数:
111
树——存储结构 双亲表示法(顺序存储) 双亲表示法:每个节点中保存指向双亲的“指针” #define MAX_TREE_SIZE 100 //树中最多的结点数 typedef struct{ //树的结点定义 ElemType data; //数据元素 int parent; //双亲位置域 }PT ...
分类:
其他好文 时间:
2020-06-28 13:06:22
阅读次数:
76
题目链接 对于每一个 \(i\) 可以看作一个管道。赋予三个信息: \(\text{minIn}_i\) 表示至少要从上一家 \(i - 1\) 得到连接数,才能正常供给 \(i\) 城市 \(\text{minOut}_i\) 最坏情况下最少给下一家 \(i + 1\) 多少连接数 \(\text ...
分类:
Web程序 时间:
2020-06-28 00:30:11
阅读次数:
76
给定一个整数 n,生成所有由 1 ... n 为节点所组成的 二叉搜索树 。 输入:3 输出: [ [1,null,3,2], [3,2,null,1], [3,1,null,null,2], [2,1,3], [1,null,2,null,3] ] 解释: 以上的输出对应以下 5 种不同结构的二叉 ...
分类:
其他好文 时间:
2020-06-27 20:32:43
阅读次数:
68
/*增设tag数据,区分队满队空*/ #include<stdio.h> #define MaxSize 10 typedef char ElemType; typedef struct { ElemType data[MaxSize]; int front,rear,tag; }SqQueue; ...
分类:
其他好文 时间:
2020-06-27 20:16:37
阅读次数:
60
/*增设表示元素个数的数据*/ #include<stdio.h> #define MaxSize 10 typedef char ElemType; typedef struct { ElemType data[MaxSize]; int front,rear; int size; }SqQueu ...
分类:
其他好文 时间:
2020-06-27 19:54:01
阅读次数:
66
一直不明白什么时候应用指令。 一个开源项目中的指令应用场景。 头部右上角有登陆信息,用户登陆后和未登录的情况,menu列表不同。 <!-- Show this for logged out users --> <ul *appShowAuthed="false" class="nav navbar- ...
分类:
其他好文 时间:
2020-06-27 15:54:11
阅读次数:
107