Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Humain {
- private:
- string _nom;
- string _type = "humain";
- public:
- void setNom(string value) {
- _nom = value;
- }
- string getNom() {
- return _nom;
- }
- Humain ();
- void display() {
- return _nom;
- }
- virtual string getType (){
- return _type;
- }
- };
- class Personne :public Humain {
- };
- class Zombie :public Humain{
- };
- int main()
- {
- Humain Leo;
- Leo.setNom= "Leo";
- cout << Leo.display();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement