码迷,mamicode.com
首页 >  
搜索关键字:struct dpif_class    ( 18974个结果
hiho 第二周
Trie树,第一次写,简单的建树+搜索它的思路hiho上讲得很清楚,good~ 1 #include 2 #include 3 using namespace std; 4 char word[11]; 5 int n,m; 6 struct trie 7 { 8 int num; 9 ...
分类:其他好文   时间:2014-07-19 21:17:39    阅读次数:205
链表操作
1链表逆序http://blog.csdn.net/niuer09/article/details/5961004typedef struct tagListNode{ int data; struct tagListNode* next;}ListNode, *List;List Re...
分类:其他好文   时间:2014-07-19 20:28:12    阅读次数:188
FZU 2150 Fire Game --两点同步搜索
枚举两点,然后同步BFS,看代码吧,很容易懂的。代码:#include #include #include #include #include #include #include #define Mod 1000000007using namespace std;struct Point{ i...
分类:其他好文   时间:2014-07-19 20:21:38    阅读次数:245
C语言结构体的初始化
今天在工作时,看到了奇葩的结构体初始化方式,于是我查了一下C99标准文档和gcc的说明文档,终于搞清楚是怎么回事了。 假设有如下结构体定义:typedef struct{ int a, b, c;} MyStruct; 那么结构体的初始化方式如下有三种:(1) C89的初始化方式MyS...
分类:编程语言   时间:2014-07-19 20:09:36    阅读次数:203
好久没更新了,哪里不对!更新二叉树的非递归遍历
#include #include using namespace std;typedef struct Node{ Node* lchild; Node* rchild; int data;}BNode,BTree;void visit(Node*);void inorder(B...
分类:其他好文   时间:2014-07-19 19:26:40    阅读次数:226
4.1 对每个命令行参数打印文件类型
file/filetype.c #include "apue.h"intmain(int argc, char *argv[]){ int i; struct stat buf; char *ptr; for (i = 1; i < argc; i++) { printf("%s: ", argv[...
分类:其他好文   时间:2014-07-18 23:38:27    阅读次数:412
c++包含头文件好还是重新定义好
A.hstruct A{ int a; int b;}; B.cpp在B.cpp里面用到这个结构体有两种方法1.自己定义一个一模一样的结构体struct A{};2.包含A.h头文件 第一种感觉有点蛋疼同样的结构体定义两次,是不是重复了第二种包含别人的头文件,会带来编译的小麻烦,而且这样...
分类:编程语言   时间:2014-07-18 23:23:26    阅读次数:263
【linux c learn 之stat】获取文件的属性
NAME        stat 获取文件属性 这个函数位于头文件中 函数原型: int stat(const char *path, struct stat *buf); 参数: path  文件路径+文件名 buf     指向buffer的指针 返回值: -1   遇到错误 0    成功返回 函数作用: 把path文件的信息复制到指针buf所指的结构体中。...
分类:系统相关   时间:2014-07-18 21:36:18    阅读次数:263
ZOJ 1649
这题要用BFS去做,要注意的是’x‘,这里可以有优先队列去做,会很简单;另一个要注意的是,a只有一个,r可能有很多个,所以可以用a去找最接近的r;#include #include #include "string.h"using namespace std;struct step{ int x,y...
分类:其他好文   时间:2014-07-17 18:13:36    阅读次数:180
结构体 变迁
struct 结构体是由基本数据类型构成、并用一个标识符来命名的各种变量的组合 格式 struct  结构名 {      类型 变量名;      类型 变量名;      ...... }结构变量; 结构名是结构的标识符 结构 typedef  给结构体起别名 结构数组...
分类:其他好文   时间:2014-07-17 10:15:07    阅读次数:244
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!