码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
Trie树 模板
#include #include #include #define MAX 27typedef struct node{ int v; struct node *next[MAX];}Trie;Trie *root;void creatTrie(char *str){ int i...
分类:其他好文   时间:2014-07-31 16:23:26    阅读次数:212
error: unknown field 'ioctl' specified in initializer
error message:原因: 从2.6.36开始,file_operations结构发生了重大变化具体看 xx../include/linux/fs.h定义:取消了原先的int (*ioctl)(struct inode*, struct file*, unsigned int, unsign...
分类:其他好文   时间:2014-07-31 16:19:37    阅读次数:275
SGU 119
欧几里得- -要分N种情况- -#include#includeusing namespace std;int gcd(int x,int y){if (y==0) return x;return gcd(y,x%y);}struct node{ int x,y; friend ...
分类:其他好文   时间:2014-07-31 16:18:27    阅读次数:156
二叉树的子结构
主要通过递归完成: 1 根节点是否相同,不相同,进行第一次递归 2 根节点相同,在另外一个函数进行递归,判断子节点是否相同 #include #include using namespace std; typedef struct tree{ int key; struct tree *left; struct tree *right; } * pTree,Tree; ...
分类:其他好文   时间:2014-07-31 13:35:56    阅读次数:201
HDU 1710 Binary Tree Traversals(二叉树)
题目地址:HDU 1710 已知二叉树先序和中序求后序。 #include #include int a[1001], cnt; typedef struct node { int date ; node *lchild , *rchild ; }*tree; int getk(int ch,int ino[],int is,int n) { for(int i =...
分类:其他好文   时间:2014-07-31 13:25:46    阅读次数:225
结构体位制详解 -- C
#include #include #include //基本概念 /* struct _M { (1) 类型 参数名 : 占位大小; (2) 类型 : 占位大小; } (1) 类型 -- int,unsigned(32位),short,char。 参数名 -- 同个结构体里面不能重名参数。 占位大小 -- 不能大于类型最最大位数。 (2) 一般用于寄存器中保留位 */ //占位大小问题: /* err -- int类型是3...
分类:其他好文   时间:2014-07-31 13:24:26    阅读次数:337
ePass.CreateFile
javascript和vbscript中没有结构体Struct,ePass的ActiveX对象中把各个参数都展开了,官方文档只给出了对应的代码,没有给出相应的数字,示例代码中却都是数字,其VC代码中有对应的定义,如下ePass.CreateFile(IFlags, ulID, ulFileSize,...
分类:其他好文   时间:2014-07-31 13:00:36    阅读次数:147
红黑树
红黑树数据结构#ifndef __RED_BLACK_TREE_H#define __RED_BLACK_TREE_H#define RED 1#define BLACK 0typedef struct Red_Black_Node{ int id; int color; int ...
分类:其他好文   时间:2014-07-31 12:49:56    阅读次数:165
Binary Tree Preorder Traversal
二叉树的前序遍历递归实现/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : v...
分类:其他好文   时间:2014-07-31 12:44:46    阅读次数:188
Binary Tree Postorder Traversal
二叉树的后序遍历递归实现/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : v...
分类:其他好文   时间:2014-07-31 12:30:16    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!