码迷,mamicode.com
首页 >  
搜索关键字:typedef struct    ( 24378个结果)
typedef函数指针那些事
首先来介绍下函数指针: 函数指针是指向函数的指针变量,即本质是一个指针变量。 int (*f) (int x); /*声明一个函数指针*/f=func; /*将func函数的首地址赋给指针f */使用的时候可以直接通过(*f)(x)这样的形式。网上有很多的函数指针资料,就不多说了。当我们在函数指.....
分类:其他好文   时间:2014-07-18 20:01:15    阅读次数:202
Poj 3259 Wormholes 负环判断 SPFA & BellmanFord
#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;typedef long ...
分类:其他好文   时间:2014-07-18 19:22:03    阅读次数:157
POJ - 1915 Knight Moves
BFS结合队列#include#include#includeusing namespace std;int x,y,l;const int maxn=300+5;int visit[maxn][maxn];struct node{ int xpos; int ypos; int ...
分类:其他好文   时间:2014-07-18 00:11:24    阅读次数:245
事件tou
#define EV_TIMER_RESOLUTION 1 /* 1 msec */#define EV_READ_EVENT EPOLLIN#define EV_WRITE_EVENT EPOLLOUTstruct ev_event;struct ev_timer;typedef void ...
分类:其他好文   时间:2014-07-17 22:37:16    阅读次数:276
HDU 4121 Xiangqi
模拟吧,算是。。。被这个题wa到哭,真是什么都不想说了。。。上代码 1 #include 2 #include 3 using namespace std; 4 5 struct node { 6 int x,y; 7 char c; 8 }q[10]; 9 ...
分类:其他好文   时间:2014-07-17 22:21:32    阅读次数:458
C/C++时间函数的使用
来源:http://blog.csdn.net/apull/article/details/5379819一、获取日历时间time_t是定义在time.h中的一个类型,表示一个日历时间,也就是从1970年1月1日0时0分0秒到此时的秒数,原型是:typedef long time_t; /* tim...
分类:编程语言   时间:2014-07-17 22:07:15    阅读次数:507
C语言快速入门系列(六)
C语言快速入门系列(五) 化繁为简依旧是本系列教程的主题! 上一节我们对C语言中的指针进行了初步的了解,学习了指针的定义,与普通变量 一维数组,二维数组,字符串之间的使用!在本节中我们将会学习一些新的知识点, 函数,结构体与共用体,枚举类型以及类型定义符typedef!...
分类:编程语言   时间:2014-07-17 19:25:16    阅读次数:324
POJ 2243 || HDU 1372:Knight Moves(BFS)
简单搜索 直接代码: #include #include #include #include using namespace std; char a,c; int e,f; int dx[8] = {-2, -2, -1, -1, 1, 1, 2, 2}; int dy[8] = {-1, 1, -2, 2, -2, 2, -1, 1}; int qq[9][9]; struct node {...
分类:其他好文   时间:2014-07-17 19:05:30    阅读次数:265
ZOJ 1649
这题要用BFS去做,要注意的是’x‘,这里可以有优先队列去做,会很简单;另一个要注意的是,a只有一个,r可能有很多个,所以可以用a去找最接近的r;#include #include #include "string.h"using namespace std;struct step{ int x,y...
分类:其他好文   时间:2014-07-17 18:13:36    阅读次数:180
UIPanGestureRecognizer上下左右滑动方向判断算法
CGFloat const gestureMinimumTranslation = 20.0; typedef enum : NSInteger {     kCameraMoveDirectionNone,     kCameraMoveDirectionUp,     kCameraMoveDirectionDown,     kCameraMoveDirectionR...
分类:其他好文   时间:2014-07-17 16:00:46    阅读次数:627
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!