码迷,mamicode.com
首页 >  
搜索关键字:typedef struct    ( 24378个结果
【POJ】3630 Phone List
静态字典树。 1 #include 2 #include 3 #include 4 5 #define MAXN 10005 6 7 typedef struct Trie { 8 bool v; 9 Trie *next[10];10 Trie() {11 ...
分类:其他好文   时间:2014-06-28 09:39:33    阅读次数:171
boost asio库 同步socket连接示例
/////////////////////////////////////// // Asio同步socket连接示例 // #include #include #include #include using namespace boost; typedef boost::asio::io_service IoService; typedef boost::asio::ip::tcp T...
分类:其他好文   时间:2014-06-28 09:24:33    阅读次数:234
typedef struct与struct定义结构体
今天在定义结构体的时候发现typedef struct与struct定义结构体有一些不同之处: 结构也是一种数据类型, 可以使用结构变量, 因此,  象其它 类型的变量一样, 在使用结构变量时要先对其定义。    定义结构变量的一般格式为:         struct 结构名         {                 类型  变量名;                 类...
分类:其他好文   时间:2014-06-28 08:50:46    阅读次数:147
快速入门C#编程之struct和class对比
1、下面是一个结构的定义: public struct Point { public int X { get; set; } public int Y { get; set; } } 什么时候用结构: 用于小型的数据结构 其中的值一般不修改...
分类:其他好文   时间:2014-06-28 08:38:41    阅读次数:164
STL 队列 、优先队列、栈 小结
学长说现在基本上可以开始学习STL中一些标准模板了,今天先总结一下 队列、栈、优先队列 1、队列(queue)       先进先出原则,头文件#include ,定义结构queue名称;queueq、queueq等; 如: struct node { int x; }f; queueq;//结构体类型队列 q.push(f) //将f压入队列的尾部 node t...
分类:其他好文   时间:2014-06-28 08:36:49    阅读次数:162
给定单向链表的头指针和一个结点指针,定义一个函数在O(1)时间删除该结点
#include #include #include #include using namespace std; struct Node { int data; struct Node* next; }; struct Node* create_list(int len) { if (len <= 0) return NULL; struct Node* head; ...
分类:其他好文   时间:2014-06-27 23:54:36    阅读次数:311
linux字符设备驱动
本篇文章记录字符设备的驱动框架:1.定义cdev接口体和class结构体#define HELLO_CNT 2static int major = 0;//主设备号为0,需要让系统自动生成主设备号static struct cdev hello_cdev;static struct class *c...
分类:系统相关   时间:2014-06-27 22:36:58    阅读次数:423
【POJ】2503 Babelfish
字典树简单题。 1 #include 2 #include 3 #include 4 5 typedef struct Trie { 6 Trie *next[26]; 7 char str[15]; 8 } Trie; 9 10 Trie root;11 12 void c...
分类:其他好文   时间:2014-06-27 11:32:27    阅读次数:172
ural 1076 Trash 二分图最大权匹配(费用流实现)
统计每种垃圾的总和,若将K种垃圾倒入第F个垃圾桶,那么花费就是K-F(k)  (自己已经有的垃圾不用倒)。 然后就是简单的二分图建图。 #include #include #include #include using namespace std; #define MAXN 1000 #define MAXM 1000000 #define INF 0x3f3f3f3f struct ...
分类:其他好文   时间:2014-06-27 07:47:46    阅读次数:205
PKU 3613 Cow Relays (指定路径条数的最短路)
题意:N,T,S,E:给你T条边,每条边两端都有编号和权值,问从S走到E允许走N条边,求最短路。 foyld加矩阵快速幂思想。 注意要把边离散 #include #include #include #include using namespace std; #define M 303 #define inf 0x3fffffff struct node { ...
分类:其他好文   时间:2014-06-27 07:39:23    阅读次数:178
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!