先看 普通菱形继承
#include <iostream>
#include <string>
using namespace std;
class Animal {int a_age;
};
class Sheep : public Animal {};
class Tuo : public Animal {};
class SheepTuo : public Sheep, public Tuo {};
void test1() {cout << …
文章没有解释和代码注释,代码经改进,做成了好理解,关键是好记忆的方式进行书写。用于自己进行查阅
#include <stdio.h>void merge(int arr1[],int left ,int mid ,int right)
{int temp[sizeof(arr1)];int i left ;int j mid 1;int t 0;while…
class Base
{
public:Base(){this->m_A 100;}void func(){cout << "Base中的Func调用" << endl;}void func(int a){cout << "Base中的Func(int a)调用" << endl;}int m_A;
};
class Son : public Base
{
public:Son(){this-&g…