#includeusing namespace std;class node{public:
node():value(0),next(NULL){} ~node(){} int value; node* next;};///be careful
this ;node* cr...
分类:
其他好文 时间:
2014-05-23 10:28:09
阅读次数:
250
LINK : fatal error LNK1123: failure during
conversion to COFF: file invalid or corruptAfter installing Visual Studio 2010
Service Pack 1, some users w...
分类:
其他好文 时间:
2014-05-23 10:26:11
阅读次数:
403
参考资料《大话设计模式》Mediator(中介者)模式:使各个对象不需要显式的相互调用,从而使其耦合松散。using System;using
System.Collections.Generic;using System.Linq;using System.Text;namespace
ds_me...
分类:
其他好文 时间:
2014-05-23 10:13:17
阅读次数:
331
#includeusing namespace std;class node{public:
node():value(0),next(NULL){} ~node(){} int value; node* next;};///be careful
this ;node* cr...
分类:
其他好文 时间:
2014-05-23 10:06:09
阅读次数:
247
题目:
链接:点击打开链接
算法:
赤裸裸的并查集。
代码:
#include
#include
#include
using namespace std;
int n,m;
int root[1010];
int find(int x)
{
int r = x;
while(root[r] != r)
r = root[r];
...
分类:
其他好文 时间:
2014-05-22 10:36:30
阅读次数:
219
#include
#include
#include
#include
#include
using namespace std;
struct Library
{
long number;//编号
string bookname;//书名
string author;//作者
string press;//出版社
int price;//价格
}...
分类:
其他好文 时间:
2014-05-22 07:17:38
阅读次数:
206
参考资料《大话设计模式》职责链模式:using System;using
System.Collections.Generic;using System.Linq;using System.Text;namespace
ds_chainofresponsibility{ class Progr...
分类:
其他好文 时间:
2014-05-20 12:52:03
阅读次数:
328
题目:从上往下打印出二叉树的每个节点,同一层的节点按照从左到右的顺序打印。分析:其实就是按层的遍历方式#include #include using
namespace std;struct BinaryTree{ int data; BinaryTree* lchild; Bin...
分类:
其他好文 时间:
2014-05-20 10:13:47
阅读次数:
242
using System;using System.Collections.Generic;using
System.Linq;using System.Text;using System.Data;using
System.Data.SqlClient;namespace AddressBook{...
分类:
数据库 时间:
2014-05-20 10:08:21
阅读次数:
328
用指针方式实现栈,相对于顺序栈,指针方式不用指定栈的大小,先定义一个栈节点类,再定义一个链栈类,为使链栈类能访问栈节点的元素,设链栈类为栈节点类的友元类。#includeusing
namespace std;class LinkStack;class StackNode //设计每个节点的类型{ ...
分类:
其他好文 时间:
2014-05-20 08:45:15
阅读次数:
288