继承#include using namespace std;class father{public: void getHeight(){coutweightheightageusing namespace std;class father{public: int height;};cl...
分类:
编程语言 时间:
2015-06-21 14:16:24
阅读次数:
121
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5272
这道题就是按照题意模拟。
正常做就行#include using namespace std;
int main()
{
int t;
long long m;
cin>>t;
while(t--)
{
cin>>m;...
分类:
其他好文 时间:
2015-06-21 11:59:42
阅读次数:
127
// 斐波那契查找.cpp
#include
#include
using namespace std; const int max_size=20;//斐波那契数组的长度 /*构造一个斐波那契数组*/
void Fibonacci(int * F)
{
F[0]=0;...
分类:
其他好文 时间:
2015-06-21 09:30:24
阅读次数:
245
list中的函数代码事例如下:
#include
#include
using namespace std;
typedef list INTLIST;
//从前向后显示list队列的全部元素
void put_list(INTLIST list, char *name)
{
INTLIST::iterator plist;
cout << "The content...
分类:
其他好文 时间:
2015-06-21 09:27:56
阅读次数:
105
求n减去在环上的元素个数
#include
#include
#include
#include
#include
using namespace std;
#define N 111111
stacksta;
vectormp[N];
int dfn[N];
int low[N];
int InStack[N];
int indexx,number;
int n, m;
int nu...
分类:
其他好文 时间:
2015-06-21 09:23:41
阅读次数:
121
最近参考了园友的自动生成目录的方法,我增加了能够自动生成三级目录的JS代码。把上述JS代码复制到“页脚Html代码”里。在写博客的时候,给每个章节的标题设置“标题1”或“标题2”或“标题3”格式。然后一切就绪,欣赏效果吧。这里有个例子(http://www.cnblogs.com/bitzhuwei...
分类:
Web程序 时间:
2015-06-21 01:55:30
阅读次数:
228
#include using namespace std;class num{public: num(){n=new int;*n=1;coutx=a.x;cout two.operator =(one); cout<<two.getX()<<endl; retur...
分类:
编程语言 时间:
2015-06-20 23:29:40
阅读次数:
235
#include
#include
#include
#include
#include
using namespace std;
const int M = 26;
int n;
#define maxn 1005
char S[maxn][21];
struct Node
{
int v;
Node *next[M];
}*root;
void Creat(...
分类:
其他好文 时间:
2015-06-20 19:42:06
阅读次数:
107
一 直接在主线程捕获子线程异常(此方法不可取)
using System;
using System.Threading;
namespace CatchThreadException
{
class Program
{
static void Main(string[] args)
{
try
{
...
分类:
编程语言 时间:
2015-06-20 19:41:51
阅读次数:
187
#include
using namespace std;template
class auto_ptr_
{
public:
auto_ptr_(Type *t = NULL) :ptr(t), count(new int(1))
{
}
auto_ptr_(const auto_ptr_& at) :ptr(at...
分类:
编程语言 时间:
2015-06-20 18:27:19
阅读次数:
149