码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
线性表[ACM] (有bug)有待修改
1 #include "iostream" 2 #include "string" 3 using namespace std; 4 5 typedef struct node{ 6 string data; 7 struct node *next; 8 node(str...
分类:其他好文   时间:2014-05-19 22:08:01    阅读次数:368
where T
这是参数类型约束,指定T必须是Class类型。.NET支持的类型参数约束有以下五种:where T : struct | T必须是一个结构类型where T : class | T必须是一个Class类型where T : new() | T必须要有一个无参构造函数where T : NameOfB...
分类:其他好文   时间:2014-05-19 20:50:40    阅读次数:268
AC自动机
hdu2222 字符串多模匹配算法 采用kuangbin模板#include #include #include #include #include using namespace std;struct Trie{ int next[500010][26],fail[500010],end[5...
分类:其他好文   时间:2014-05-19 08:36:17    阅读次数:234
枚举|标志枚举+|(或)和&(与)运算|类型转换|值类型和引用类型|传参|异常|垃圾回收
枚举部分 enum 关键字用于声明枚举,即一种由一组称为枚举数列表的命名常量组成的独特类型。 通常情况下,最好是在命名空间内直接定义枚举,以便该命名空间中的所有类都能够同样方便地访问它。 但是,还可以将枚举嵌套在类或结构中。默认情况下,第一个枚举数的值为 0,后面每个枚举数的值依次递增 1。 ...
分类:其他好文   时间:2014-05-19 06:53:15    阅读次数:519
双向循环链表
dllist.h 1 #ifndef _DLLIST_H 2 #define _DLLIST_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 struct DLLNode_T{ 9 void *pData; ...
分类:其他好文   时间:2014-05-18 19:51:42    阅读次数:335
Golang(笔记) 面向对象
package main import ("fmt")//对象定义type Rect struct{x,y float64width ,height float64} //对象方法实现func (r *Rect) Area()float64{return r.width*r.height}//Go语...
分类:其他好文   时间:2014-05-18 19:36:55    阅读次数:405
【数据结构】二叉树遍历
先序遍历和中序遍历非递归代码:#include #include using namespace std;typedef struct BinaryTree { int data; struct BinaryTree *rchild, *lchild;}BinaryTree;int cr...
分类:其他好文   时间:2014-05-17 21:56:50    阅读次数:264
poj3468
线段树中对一段区间操作的方法----记录增量。详细实现见代码。还要好好体会! 1 //Accepted 6688K 1485MS 2 #include 3 #include 4 #define imax 100005 5 struct node 6 { 7 int l...
分类:其他好文   时间:2014-05-17 21:18:35    阅读次数:312
poj3264
1 //Accepted 2384K 1766MS 2 #include 3 #include 4 #define imax 50005 5 struct node 6 { 7 int l,r; 8 int tmax,tmin; 9 }f[3*imax];10 in...
分类:其他好文   时间:2014-05-17 21:16:33    阅读次数:281
引用类型与值类型在编码上的区别
一、引入类型与值类型简介 值类型:直接存放于栈中,取的时候是直接取得值。值类型继承自System.ValueType。(自定义对象) 引用类型:存在于托管堆中,取的时候是从栈取该对象的地址,然后用这个地址去托管堆中取值。引用类型继承自System.Object。(int,bool,struct).....
分类:其他好文   时间:2014-05-17 17:58:48    阅读次数:181
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!