码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
【足迹C++primer】48、函数引用操作符
函数引用操作符 struct absInt { int operator()(int val) const { cout!!!"<<endl; return val<0 ? -val : val; } }; void fun1() { int i=-42; absInt absObj; int ui=absObj...
分类:编程语言   时间:2014-07-20 10:32:09    阅读次数:380
hdu 1251 统计
他妹的,敲完了,电脑死机了,全部消失了,又从新打了一遍,。。。这是什么节奏#include #include #include #define ZERO 0 #define ALPH_LEN 26 /* 26个字母 */ const char FIRST_CHAR = 'a'; typedef struct node { struct node *child[ALPH_LEN]; ...
分类:其他好文   时间:2014-07-20 00:31:16    阅读次数:286
hdu 1009--greedy
/** \brief hdu 1009--greedy * * \param date 2014/7/18 * \param state AC * \return * */ #include #include #include #include using namespace std; const int MAXN=1001; struct Data { int...
分类:其他好文   时间:2014-07-19 23:41:49    阅读次数:237
网络编程Socket之TCP之TIME_WAIT状态详解
下面我们用最简单的一对一的客户服务器模型来重现编程中遇到的一些问题: 初学socket的时候在编写socket程序的时候会遇到很多莫名其妙的问题,比如说bind函数返回的常见错误是EADDRINUSE 使用下面的程序重现这个状态: client: int main(int argc, const char * argv[]) { struct sockaddr_in ...
分类:其他好文   时间:2014-07-19 23:36:19    阅读次数:427
银行综合储蓄业务系统,水平为学了一年C语言
银行综合储蓄业务系统 #include #include int acccunt = 0; char name[10],pw[10]; struct user   //定义结构体 { int ID; char userName[10]; char userPwd[10]; float money; int status;  // 状态 1:正常 2. 挂失 0:销户 ...
分类:编程语言   时间:2014-07-19 23:24:29    阅读次数:336
nginx内存池
一、设计原则 (1)减少内存碎片 (2)减少向操作系统申请内存的次数 (3)降低各个模块的开发效率 二、源码结构 struct ngx_pool_s {     ngx_pool_data_t       d;     size_t                max;     ngx_pool_t           *current;     ngx_chain_t    ...
分类:其他好文   时间:2014-07-19 23:16:14    阅读次数:258
模板,BFS
#include #include #include using namespace std; struct node { int x,y,step; }; char map[105][105]; int vis[105][105]; int to[4][2]= {1,0,-1,0,0,1,0,-1}; int n,m,sx,sy,ex,ey,ans; int check(in...
分类:其他好文   时间:2014-07-19 23:11:19    阅读次数:330
CodeForces 230A
简单的一个排序+贪心#include #include using namespace std;struct peo{ int x,y;};bool com(peo a,peo b){ return a.x>s>>n; for(int i=0;i>l[i].x>>l[i].y; ...
分类:其他好文   时间:2014-07-19 18:34:28    阅读次数:207
POJ 3984
bfs,用数组来构建队列,用front指针来连接每一步输出的时候注意(0, 0)逗号后又一个空格。。。。被坑了一次#include using namespace std;struct step{ int x,y; step *front; void init(int xx,int yy){ x=x...
分类:其他好文   时间:2014-07-19 18:17:27    阅读次数:260
011_hasCycle
1 /* 2 * Author :SJQ 3 * 4 * Time :2014-07-16-20.21 5 * 6 */ 7 #include 8 #include 9 #include 10 using namespace std;11 12 struct ListNode {...
分类:其他好文   时间:2014-07-19 13:36:10    阅读次数:166
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!