Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A {
- public:
- int a = 10;
- };
- class B {
- int a = 20;
- };
- class C : public A, public B {
- void imprimir() {
- std::cout << a <<'\n';
- }
- };
- int main() {
- C c;
- c.imprimir();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement