摘要:
1. 纯虚函数,不能定义变量#include <iostream>using namespace std;class A{ public: virtual void f() = 0;};int main(){ A a; a.f(); return 0;}2. 虚函数是可以实现的#include <iostream>using namespace std;class A{ public: virtual void f() { cout << "hello world" << endl; }};int main(){ A... 阅读全文
posted @ 2011-09-25 23:13
wtx
阅读(245)
评论(0)
推荐(0)
摘要:
/***************************** title : 拓扑排序(邻接矩阵实现) author: jay chang date : 2009/07/14*****************************/#include<iostream>using namespace std;#define MAXSIZE 99#define FALSE 0#define TRUE 1typedef char VertexData;typedef int AdjType;typedef struct VertexNode{ VertexData verte... 阅读全文
posted @ 2011-09-25 22:53
wtx
阅读(401)
评论(0)
推荐(0)

浙公网安备 33010602011771号