guitar-player

gato_oop.cpp

Jun 6th, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>;
  3. using namespace std;
  4.  
  5. class gato
  6. {
  7.  public:
  8.   int m_peso;
  9.   string m_color;
  10.   string m_nombre;
  11. };
  12.  
  13. int main()
  14. {
  15.  gato dongato;
  16.  dongato.m_peso = 1;
  17.  dongato.m_color = "Amarillo";
  18.  dongato.m_nombre = "Dongato";
  19.  
  20.  cout << dongato.m_nombre << endl;
  21.  
  22.  return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment