一、动态栈的实现#include #include #include //定义一个节点的结构typedef struct node{ int member; //数据域 struct node *pNext; ...
分类:
编程语言 时间:
2014-07-16 22:54:30
阅读次数:
266
当Nginx检测到http关键配置项时,http配置模型启动,首先会建立一个ngx_http_cong_ctx_t结构。typedef struct{ void **main_conf; void **srv_conf; void **loc_conf;}ngx_http_conf_ctx_t...
分类:
其他好文 时间:
2014-07-16 20:58:15
阅读次数:
370
#include
using std::cout;
using std::endl;
//定义结构
struct Box{
double length;
double width;
double height;
};
double volume(const Box& aBox);
int main(){
Box box={70.0,60.0,40.0};
d...
分类:
编程语言 时间:
2014-07-11 08:37:11
阅读次数:
189
经验:避免返回handles(包括 references、指针、迭代器)指向对象内部。遵守这个条款可增加封装性,
帮助 const 成员函数的行为像个 const,并将发生“虚吊号码牌”(dangling handles)的可能性降至最低。
示例:
class Point{
public:
Point(int x, int y);
//...
void setX(int newVal);
void setY(int newVal);
//...
};
struct RectData{
Point...
分类:
编程语言 时间:
2014-07-10 22:56:05
阅读次数:
230
题目大意:
n波人去k*k的电影院看电影。
要尽量往中间坐,往前坐。
直接枚举,贪心,能坐就坐,坐在离中心最近的地方。
#include
#include
#include
#include
#define maxn 1000005
#define lowbit(x) (x&(-x))
using namespace std;
struct BI...
分类:
其他好文 时间:
2014-07-10 22:52:57
阅读次数:
262
Objective-C中常用的结构体NSRange,NSPoint,NSSize(CGSize),NSRect
1 NSRange
NSRange 的原型为
typedef struct _NSRange {
NSUInteger location;
NSUInteger length;
} NSRange;
NSMakeRange的函数...
分类:
其他好文 时间:
2014-07-10 21:52:57
阅读次数:
217
新单词unidirectional get T T
求有向图上,以某点为根的,最小生成树
参考别人的模板
#include
#include
#include
#include
#include
#include
#include
#define inf 2000000000
using namespace std;
struct node1
{
double x,...
分类:
Web程序 时间:
2014-07-10 20:32:47
阅读次数:
285
引言:
队列与栈的区别是队列是先进先出的数据结构。为了使得出入队列容易,可以引入队列头指针和队列尾指针。
分析描述:
队列的结点结构。
typedef int QElemType;
typedef struct QNode{
QElemType data;
struct QNode *next;
}QNode, *QueuePtr;...
分类:
其他好文 时间:
2014-07-10 19:28:47
阅读次数:
197
1查询oracle版本select*fromv$version2oracle运行状态selectstatusfromv$instance;是RAC集群,可以使用CRS命令查看整个集群的实例运行状态:
su-oracle
crs_stat-t
分类:
数据库 时间:
2014-07-10 17:57:22
阅读次数:
433
点击打开链接
简单
模拟机器人的移动,发生碰撞时输出相应的信息。
code
#include
#include
using namespace std;
struct node{
int k;
int s;
}
mtx[200][200];
struct node1{
int x, y;
}
rob[200];
int n, m;
int...
分类:
其他好文 时间:
2014-07-10 17:25:11
阅读次数:
153