class的继承,从基类开始
#include <iostream>
#include <stdio.h>
using namespace std;
class A
{
public:
A()
{
puts("this is A!");
}
};
class B : A
{
public:
B()
{
puts("this is B!");
}
};
class C : B
{
public:
C()
{
puts("this is C!");
}
};
int main()
{
//A a;
C c;
return 0;
}
this is A! this is B! this is C! Process returned 0 (0x0) execution time : 0.007 s Press any key to continue.
收获不会与付出成反比
by juandx

浙公网安备 33010602011771号