//多继承与虚函数
struct CA
{
    virtual int func()
    {
        return 1;
    }

    int a()
    {
        return func();
    }
};

struct CB
{
    virtual int func()
    {
        return 2;
    }

    int b()
    {
        return func();
    }
};

struct CC : CA, CB
{
    virtual int func()
    {
        return 10;
    }

    int c()
    {
        return func();
    }
};

output:
CC c;
c.a() = 10
c.b() = 10
c.c() = 10