/**
* 书本:【ThinkingInC++】
* 功能:编译期间类里的常量
* 时间:2014年9月10日08:32:56
* 作者:cutter_point
*/
#include
#include
using namespace std;
class StringStack
{
static const int size=100; //所有的对象共享且不变的数据
c...
分类:
编程语言 时间:
2014-09-10 09:40:10
阅读次数:
195
/**
* 书本:【ThinkingInC++】
* 功能:旧代码中的enum hack
* 时间:2014年9月10日08:35:13
* 作者:cutter_point
*/
#include
#include
#include
using namespace std;
class Bunch
{
enum {size=1000};
int i[size];
};
in...
分类:
编程语言 时间:
2014-09-10 09:40:00
阅读次数:
263
算法要求:输入序列是大于滤波器长度的偶数列确实可以通过编程的手段使算法适合所有的情况,但本文章的目的是展示mallat算法的过程,所以就一切从简了// Mallat.cpp : Defines the entry point for the console application.//#includ...
分类:
其他好文 时间:
2014-09-09 12:13:38
阅读次数:
177
注:本文仅供学习和交流以上是截图,下面上代码第一个类是Circlepackage org.xt.util;import java.awt.Point;public class Circle { private Point centre; private int radius; pu...
分类:
编程语言 时间:
2014-09-09 11:26:58
阅读次数:
246
2-1 Point类的定义
Time Limit: 1000MS Memory limit: 65536K
题目描述
通过本题目的练习可以掌握类与对象的定义;
设计一个点类Time,它具有私有数据成员x(横坐标)、y(纵坐标);公有成员函数:SetPoint(int,int)用于设置点对象的值,ShowPoint()用于输出点对象的信息
在主函数中调用成员函数SetP...
分类:
其他好文 时间:
2014-09-08 09:39:56
阅读次数:
245
LA 4992&& hdu 3761Jungle Outpost杭电的有点坑啊。。一直爆内存,后来发现大白的半平面交模板那里 point *p = new point[n]; line *q = new line[n]这里出了问题,应该是在函数里面申请不了比较大的数组,所以爆内存。。我在全局定义了两...
分类:
其他好文 时间:
2014-09-07 23:47:36
阅读次数:
293
2-1 Point类的定义Time Limit: 1000MS Memory limit: 65536K题目描述通过本题目的练习可以掌握类与对象的定义;设计一个点类Time,它具有私有数据成员x(横坐标)、y(纵坐标);公有成员函数:SetPoint(int,int)用于设置点对象的值,ShowPo...
分类:
其他好文 时间:
2014-09-07 22:25:35
阅读次数:
356
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo...
分类:
其他好文 时间:
2014-09-07 18:28:25
阅读次数:
271
无论什么时候传递一个地址给一个函数,都应该尽可能地用const修饰它。
/**
* 书本:【ThinkingInC++】
* 功能:论const对函数返回值的作用
* 时间:2014年9月7日14:14:01
* 作者:cutter_point
*/
class X
{
int i;
public:
X(int ii=0);
void modify();
};
X::...
分类:
编程语言 时间:
2014-09-07 14:49:35
阅读次数:
287
指针的const有两种:const修饰指针正指向的对象,或者修饰指针里面存储的地址。
/**
* 书本:【ThinkingInC++】
* 功能:const的传递和返回地址
* 时间:2014年9月7日14:11:41
* 作者:cutter_point
*/
//参数为非const类型的
void t(int*){}
//参数是const类型的
void u(const int* ...
分类:
编程语言 时间:
2014-09-07 14:49:25
阅读次数:
248