摘要:
我们知道,当一个源文件所依赖的头文件被修改时,这个源文件需要被重新编译(易碎的基类问题),为了能讲述我将说明的这个方法,我们先来看看一个简单的例子,其代码如下://head.hstruct A{ int i;};class B{ A* a;public: B(int n = 0); void show(); ~B();};//head.cpp#include "head.h"#include <iostream.h>B::B(int n){ a = new A; a->i = n;}void B::show(){ cout << a->i 阅读全文
posted @ 2012-02-28 13:30
很多不懂呀。。
阅读(206)
评论(0)
推荐(0)

浙公网安备 33010602011771号