Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. class Humain {
  6. private:
  7. string _nom;
  8. string _type = "humain";
  9.  
  10. public:
  11. void setNom(string value) {
  12. _nom = value;
  13. }
  14. string getNom() {
  15. return _nom;
  16. }
  17.  
  18. Humain ();
  19.  
  20. void display() {
  21. return _nom;
  22. }
  23.  
  24. virtual string getType (){
  25. return _type;
  26. }
  27.  
  28. };
  29.  
  30. class Personne :public Humain {
  31.  
  32.  
  33. };
  34.  
  35. class Zombie :public Humain{
  36.  
  37.  
  38. };
  39.  
  40.  
  41.  
  42. int main()
  43. {
  44. Humain Leo;
  45. Leo.setNom= "Leo";
  46.  
  47. cout << Leo.display();
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement