码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
Linux内核中的jiffies及其作用介绍及jiffies等相关函数详解
在LINUX的时钟中断中涉及至二个全局变量一个是xtime,它是timeval数据结构变量,另一个则是jiffies,首先看timeval结构struct timeval{time_t tv_sec; /***second***/susecond_t tv_usec;/***microsecond*...
分类:系统相关   时间:2014-07-02 00:54:24    阅读次数:631
枚举 与 枚举的应用
枚举 1# include //只定义了一个数据类型,并没有定义变量, 该数据类型的名字是 enum WeekDay , 默认 值是用0开始// MonDay = 0 , TuesDay = 1 .... , SunDay = 6enum WeekDay{ MonDay, TuesDay, ...
分类:其他好文   时间:2014-07-01 22:53:27    阅读次数:219
动态构造结构体数组
动态构造结构体数组# 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
串口编程485
对于波特率的设置通常使用cfsetospeed和cfsetispeed函数来完成。获取波特率信息是通过cfgetispeed和 cfgetospeed函数来完成的。 cfsetospeed函数 头文件: #include 函数原型: int cfsetospeed(struct termi...
分类:其他好文   时间:2014-07-01 21:19:53    阅读次数:348
LeetCode Partition List
/** * 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 结构体小结
C 结构体小结关于结构体的声明:# include //第一种方式struct Student{ int age; float score; char sex;};//第二种方式struct Student2{ int age; float score; char...
分类:其他好文   时间:2014-06-30 23:18:58    阅读次数:336
最短路 迪杰斯特拉.cpp
#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
哈弗曼编码和译码.cpp
#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
Swift属性
属性的存储 属性的主要作用是存储数据,可以常量属性和变量属 性;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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!