5

c++ does not refer to a value

图片说明

 #ifndef __seven____5__
#define __seven____5__

#include <stdio.h>
#include <iostream>
using namespace std;

class B1{
public:
    B1(int a){
        cout << a << " b1"<< endl;
    }
};

class B2{
public:
    B2(int b){
        cout << b << " b2"<< endl;
    }
};


class B3{
public:
    B3(){
        cout << " b3"<< endl;
    }
};

class C: public B2, public B1, public B3{
public:
    C(int a, int b, int c):B1(a), B2(b), mb2(a), mb1(b)
    {
        cout << c << " c3"<< endl;
    }

private:
    B1 mb1;
    B2 mb2:
    B3 mb3;
};

#endif

不知道为何会有这个错误啊,哪位大哥帮忙解答一下

查看全部
renzhe20092584
renzhe20092584
2015/08/16 13:11
  • c++
  • cpp
  • namespace
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

5个回复