Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //######## date 21/06/2016 ,12:34 ####### apredendo sobre herança generalizacao e agregacao ##########//
- #include <iostream>
- #include <time.h>
- #include <windows.h>
- #include <fstream>
- #include <stdlib.h>
- #include <stdio.h>
- #include <string>
- #include <windows.h>
- #include "humano.h"
- #include "mago.h"
- #include "ork.h"
- #include <iostream>
- using namespace std;
- class announcements {
- public:
- void announceAll();
- };
- void announcements::announceAll(){
- cout<<"Nos todos samos uma agregacao e friend ""amigas"<<endl;
- }
- class MagoElfoNegro{
- public:
- void announceAll();
- private:
- int hp;
- friend class MagoElfoBranco;
- };
- void MagoElfoNegro::announceAll(){
- cout <<"Ola Parceiros sou o mago elfo negro do type void escrito por jambix64 contem 1 bits Sou mais leve ^^"<<endl;
- }
- class MagoElfoBranco : public announcements{
- public:
- string announceAll(){
- string mensagem = "Ola sou mago elfo Branco escrito tipo string que contem 8 bits";
- cout<<mensagem<<endl;
- SetConsoleTitle ("AutoR Jambix64");
- return mensagem;
- }
- private:
- int power;
- MagoElfoNegro obj1;
- };
- int main(){
- MagoElfoBranco mainObj1;
- MagoElfoNegro mainObj2;
- mainObj1.announceAll();
- mainObj2.announceAll();
- cout<<"Funcao para mostra meu bits = "<<sizeof(mainObj2.announceAll())<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement