estudar10 – classes e a herança múltipla

#include <cstdlib>
#include <iostream>

using namespace std;

class Avo{

public:
    
    void mostraMsg(){
        cout << "eu sou milionario\n";
    };
};

class Pai : public Avo{

public:
};

class Filho : public Pai{

public: 
};

int main(int argc, char** argv) {
    Filho f;
    
    f.mostraMsg();
    
    return 0;
}
Tags : , ,

0 thoughts on “estudar10 – classes e a herança múltipla”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.