Advertisement
tomasaccini

Untitled

Jul 23rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. #include <ostream>
  2. #include <string.h>
  3.  
  4. class Legajo {
  5. public:
  6.     std::string numero;
  7.     // Constructor default
  8.     Legajo();
  9.  
  10.     // Constructor de inicializacion
  11.     Legajo(std::string legajo);
  12.  
  13.     // Constructor de copia
  14.     Legajo(const Legajo& other);
  15.  
  16.     // Operador <
  17.     bool operator < (const Legajo& other) const;
  18.  
  19.     // Operador ==
  20.     bool operator == (const Legajo& other) const;
  21.  
  22.     bool operator > (const Legajo& other) const{
  23.         return (this->numero > other.numero);
  24.     }
  25.  
  26.     Legajo& operator = (const Legajo& other);
  27.  
  28.     friend std::ostream& operator << (std::ostream& o, const Legajo& l);
  29. };
  30.  
  31. int main() {
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement