码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
字典树
[syswj@host 0813]$ cat dic_tree.cpp #include #include #define MAX 26using namespace std;typedef struct TrieNode{ int ncount; struct TrieNode *ne...
分类:其他好文   时间:2014-08-13 18:04:06    阅读次数:190
TOJ 4095 BoatBurglary 分治
http://acm.tju.edu.cn/toj/showp4095.html题意:N个物品,N 2 #include 3 #include 4 using namespace std; 5 6 struct arr{ 7 int num; 8 long long...
分类:其他好文   时间:2014-08-13 17:41:46    阅读次数:230
this指针的值
this指针指向的是对象的地址,与对象第一个成员变量的关系是怎样的呢?看下面这个例子:struct CPlex{ CPlex* pNext; void* data() { return this+1; }};int main(int argc, char* argv[]){ CPlex p; voi...
分类:其他好文   时间:2014-08-13 14:52:16    阅读次数:232
CGGeometry.h详解
本文转载至:http://blog.csdn.net/chengyingzhilian/article/details/7894195这些是在CGGeometry.h里的CGPoint、CGSize、CGRect、CGRectEdge实际上都是结构体struct CGPoint { CGFloat ...
分类:其他好文   时间:2014-08-13 14:46:36    阅读次数:224
HDU 3046
http://acm.hdu.edu.cn/showproblem.php?pid=3046典型的最小割模型#include #include #include using namespace std ;const int INF=0xfffffff ;struct node{ int s,...
分类:其他好文   时间:2014-08-13 14:20:36    阅读次数:199
MT7620 按键驱动(二)
一:为了消抖,笔者学习了Linux驱动之定时器API(参考 LDD定时器API (p198))定时器相关结构:struct timer_list{/*…省略一些字段…*/struct list_head list; //双向链表头,用来将多个定时器连成一个双向链表unsigned long expi...
分类:其他好文   时间:2014-08-13 12:54:36    阅读次数:642
Linux下获取本机IP地址的代码
Linux下获取本机IP地址的代码,返回值即为互联网标准点分格式的字符串。#define ETH_NAME "eth0"//获得本机IP地址char* GetLocalAddress(){ int sock; struct sockaddr_in sin; ...
分类:系统相关   时间:2014-08-13 12:41:36    阅读次数:287
AMF_OBJECT 数据结构浅析
组织的比较散,主要是标记一下有关 AMF_OBJECT数据组织结构。其标识嵌套结束则为 0x 00 00 09原始数据结构已知:key=“0123456”;Value的值是一个结构体如下:struct usrinfo{ int itype; char name[12]; ...
分类:其他好文   时间:2014-08-13 12:39:36    阅读次数:190
TopCoder SRM629 RectangleCoveringEasy
只要完全覆盖且不完全相同即可 #include using namespace std; struct RectangleCoveringEasy { int solve(int holeH, int holeW, int boardH, int boardW) { if((boardH>=holeH&&boardW>holeW)||(boardH>holeH&&boa...
分类:其他好文   时间:2014-08-13 10:32:45    阅读次数:205
TopCoder SRM629 CandyMaking
将所有密度遍历一遍求最小即可 #include using namespace std; struct CandyMaking { double findSuitableDensity(vector containerVolume, vector desiredWeight) { vectorv; double Min=50000000; ...
分类:其他好文   时间:2014-08-13 10:31:55    阅读次数:216
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!