码迷,mamicode.com
首页 >  
搜索关键字:struct sk_buff    ( 19001个结果
约瑟夫环 c++ 循环输入
#include#include#include#include using namespace std;template class joseph{ struct node { T data; node * next; node():next(...
分类:编程语言   时间:2014-05-26 06:44:29    阅读次数:390
回调函数的应用误区4(c/s OK版本回调小程序)
##################dll.h###################pragma oncetypedef void (*CALLBACK)(int );typedef struct handleCB{ CALLBACK t_fun;}stCallBack;static stCallB...
分类:其他好文   时间:2014-05-26 06:22:27    阅读次数:275
cocos2dx 获取当前时间
之前使用过cocos2d-x获取系统时间,毫秒级的 [cpp] view plaincopy long getCurrentTime()      {           struct timeval tv;           gettimeofday(&tv,NULL);           return tv.tv_sec * 10...
分类:其他好文   时间:2014-05-26 05:37:49    阅读次数:358
【3】输入一颗二叉树判断是不是平衡二叉树
题目:输入一颗二叉树的根结点,判断该二叉树是不是平衡二叉树。平衡二叉树是满足所有结点的左右子树的高度差不超过1的二叉树 方案一:遍历数组的每一个结点,对每一个结点求它的左右子树的高度并进行判断。时间复杂度大于O(n),小于O(n^2)效率较低,因为有很多点需要重复访问。 //二叉树的结点 struct BinaryTreeNode{ int m_value; Bin...
分类:其他好文   时间:2014-05-26 04:34:53    阅读次数:192
C语言 - 结构体(struct)的位字段(:) 详解
结构体(struct)的位字段(:) 详解 本文地址: http://blog.csdn.net/caroline_wendy/article/details/26722511 结构体(struct)可以使用位字段(:), 节省空间, 如以下代码,  结构体a中的, 第一个变量x占用1个字符, y占用2个字符, z占用33个字符(越界); 但是sizeof()会自动补齐, 如x+y一共占用4个字节, z占用8个字节, 所以...
分类:编程语言   时间:2014-05-26 04:12:18    阅读次数:514
两栈共享空间的c语言实现
1. 两栈共享空间结构 typedef struct { SElemType data[MAXSIZE]; int top1; /* 栈1栈顶指针 */ int top2; /* 栈2栈顶指针 */ }SqDoubleStack;...
分类:编程语言   时间:2014-05-26 03:52:28    阅读次数:391
链栈的c语言实现
1.链栈结构 typedef struct StackNode { SElemType data; struct StackNode *next; }StackNode,*LinkStackPtr; typedef struct { LinkStackPtr top; int count; }LinkSta...
分类:编程语言   时间:2014-05-24 23:35:39    阅读次数:429
c 实现IO流
// // fs_stream.h // fsnet // // Created by Vincent on 14-5-22. // Copyright (c) 2014年 Vincent. All rights reserved. // #ifndef fsnet_fs_stream_h #define fsnet_fs_stream_h #include "fs_define.h"...
分类:其他好文   时间:2014-05-24 18:19:34    阅读次数:372
POJ3067 树状数组+逆序数
设两线段为(x1,y1) ,(x2,y2), 若使两线段相交,需使x1y2||x1>x2&&y1 2 #include 3 #include 4 #define MAXH 1005 5 using namespace std; 6 7 int n, m, k; 8 struct mem{ 9 ...
分类:其他好文   时间:2014-05-24 12:43:55    阅读次数:333
stack2
#includeusing namespace std;template class Stack{ private: struct Node{ Object data; Node * next; Node(cons...
分类:其他好文   时间:2014-05-24 09:32:25    阅读次数:215
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!