动态构造结构体数组# include # include struct Student{ int age; float score; char name[100];};int main(void){ int len; struct Student * pArr; ...
分类:
其他好文 时间:
2014-07-01 22:33:31
阅读次数:
204
对于波特率的设置通常使用cfsetospeed和cfsetispeed函数来完成。获取波特率信息是通过cfgetispeed和 cfgetospeed函数来完成的。 cfsetospeed函数 头文件: #include 函数原型: int cfsetospeed(struct termi...
分类:
其他好文 时间:
2014-07-01 21:19:53
阅读次数:
348
#includevoid main(){const int count = 5;//定义数量struct student{char name[80];float math,eng;float aver;}stu[count],temp;//输入for (int i = 0; i stu[sub].a...
分类:
编程语言 时间:
2014-07-01 13:32:56
阅读次数:
257
AC自动机模板题。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 #define TRIEN 128 8 #define MAXN 505 9 10 typedef str...
分类:
其他好文 时间:
2014-07-01 00:07:22
阅读次数:
257
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *...
分类:
其他好文 时间:
2014-06-30 23:36:56
阅读次数:
211
C 结构体小结关于结构体的声明:# include //第一种方式struct Student{ int age; float score; char sex;};//第二种方式struct Student2{ int age; float score; char...
分类:
其他好文 时间:
2014-06-30 23:18:58
阅读次数:
336
#include
#include
#define INITITY 999//最大值
#define VERTEX 20//最多顶点个数
#define FALSE 0
#define TURE 1
#define size 30
#define OVERFLOW -1
typedef struct ArcCell{
int adj;//权值类型
}ArcCell,AdjMatrix[VE...
分类:
其他好文 时间:
2014-06-30 19:44:49
阅读次数:
313
#include
#include
#include
typedef struct{
char a;//记录对应字符
int weight;//权值
int parent,lchild,rchild;
}HTNode,*HuffmanTree;
typedef char * *HuffmanCode;//动态分配数组存储哈夫曼编码表
void Select(H...
分类:
其他好文 时间:
2014-06-30 19:21:16
阅读次数:
205
下面这个散列表的实现来自K&R,很经典。在其他场景中遇到的实现更复杂,基本原理不变,只是在hash算法,或者在快速查询上做了优化。
#include
#include
//具有相同hash值构成的链表
struct nlist{
struct nlist
* next;
char * name; //key-定义的名字
char ...
分类:
其他好文 时间:
2014-06-30 19:08:53
阅读次数:
209
属性的存储 属性的主要作用是存储数据,可以常量属性和变量属 性;struct FixedLengthRange {
var firstValue: Int let length: Int
}
var rangeOfThreeItems =FixedLengthRange(firstValue: 0,
length: 3)
// the range represents integer value...
分类:
其他好文 时间:
2014-06-30 18:53:33
阅读次数:
271