码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
java枚举
public class TestEnum { /**?普通枚举 ? ? ?* @author ?qk ? ? ?*/ ? ? public enum ColorEnum { ? ? ? ? red, green, yellow, blue; ? ? }? ? ? /** ? ? ?* 枚举像普通的类一样可以添加属...
分类:编程语言   时间:2014-08-06 12:04:01    阅读次数:215
二叉树(二)——遍历、深度统计、叶子结点统计、结点统计
1.二叉树的相关算法的实现(链表)。 #include #include #define NULL 0 typedef struct tree { int data; struct tree *left, *right; }ElemBT; void create_btree(ElemBT *root, int list[], int n) /*n表示list数组中元素的个数*/ {...
分类:其他好文   时间:2014-08-06 12:00:01    阅读次数:183
二叉树和为某值
很容易想到用先序遍历,并传递进去一个数组和当前和。just so so 代码: #include #include #include using namespace std; typedef struct tree{ int data; struct tree * lchild; struct tree * rchild; }Tree,*pTree; void create...
分类:其他好文   时间:2014-08-06 11:55:31    阅读次数:227
Linux时间结构体和获得时间函数
关于Linux下时间编程的问题:1. Linux下与时间有关的结构体struct timeval{int tv_sec;int tv_usec;};其中tv_sec是由凌晨开始算起的秒数,tv_usec则是微秒(10E-6 second)。struct timezone{int tv_minut.....
分类:系统相关   时间:2014-08-06 11:35:41    阅读次数:313
[Golong]学习笔记(一) 基础知识
Go编程基础 Go的内置关键字(25个) 不多 break default func interface select case defer go map struct chan else goto package switch const fallthrough if range type continute for import return var Go的注释方...
分类:其他好文   时间:2014-08-06 01:56:50    阅读次数:313
SDUT_人活着系列
SDUT2929_人活着系列之芳姐和芳姐的猪 解题报告 求出所有最短路,枚举一个猪圈求出到有猪的猪圈的总路程最短。 #include #include #include #include #include #define inf 99999999 using namespace std; struct E { int v,w,next; } edge[5000...
分类:其他好文   时间:2014-08-06 01:55:10    阅读次数:353
最大流 Dinic + Sap 模板
不说别的,直接上模板。Dinic+当前弧优化:struct Edge{ int x,y,c,ne;}e[M*2];int be[N],all;int d[N],q[N];int stack[N],top;//栈存的是边int cur[N];//当前弧优化void add(int x, int ...
分类:其他好文   时间:2014-08-06 01:50:20    阅读次数:330
项目分析(PLUG)
plug过程1.INIT_PLUG#define INIT_PLUG Plug::InitPlug g_InitPlug(true);//共享内存数据结构struct PlugShareMemory{ void* pFirstHand; //第一个打开文件的句柄 I_Plug...
分类:其他好文   时间:2014-08-06 01:35:10    阅读次数:196
win32窗口程序的过程
复习一下win32窗口程序设计一个窗口类; 注册窗口类; 创建窗口; 显示及更新窗口。 消息循环,去获取消息; 窗口过程函数的消息响应。 设计窗口类:typedef struct _WNDCLASS {UINT style; //窗口类的类型WN...
分类:Windows程序   时间:2014-08-05 22:04:20    阅读次数:317
检测网络是否有效
//检测网络是否有效- (BOOL) checkNetworkIsValid { struct sockaddr_in zeroAddress; bzero(&zeroAddress, sizeof(zeroAddress)); zeroAddress.sin_len = size...
分类:其他好文   时间:2014-08-05 21:51:50    阅读次数:195
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!