#include<iostream.h>
class base
{
private:
int n1;
protected:
int k1;
public:
base(){n1=0;k1=1;}
void fun1(){cout<<n1<<k1<<endl;}
};
class d1:public base
{
private:
int n2;
protected:
int k2;
public:
d1(){n2=10;k1=11;}
void fun2(){fun1();cout<<n2<<k2<<endl;}
};
class d2:public d1
{
private:
int n3;
protected:
int k3;
public:
d2(){n3=20;k3=21;}
void fun3(){fun2();cout<<n3<<k3<<endl;}
};
void main()
{
base baseobj;
d1 d1obj;
d2 d2obj;
d1obj.fun1();
d1obj.fun2();
d2obj.fun3();
}
这程序出现一个错 是:--------------------Configuration: 该错 - Win32 Debug--------------------
Compiling...
1.cpp
d:\新建文件夹\msdev98\myprojects\该错\1.cpp(41) : fatal error C1010: unexpected end of file while looking for precompiled header directive
执行 cl.exe 时出错.
1.obj - 1 error(s), 0 warning(s)
我在这先谢拉