terminado parte1
This commit is contained in:
@@ -11,7 +11,7 @@ class Cliente {
|
||||
char *nombre;
|
||||
Fecha fechaAlta;
|
||||
public:
|
||||
Cliente(long int d, char *nom, Fecha f);
|
||||
Cliente(long int d, const char *nom, Fecha f);
|
||||
virtual ~Cliente();
|
||||
Cliente& operator=(const Cliente& c);
|
||||
|
||||
@@ -19,10 +19,10 @@ public:
|
||||
const char* getNombre() const { return nombre; } //VIP devolver un puntero constante para evitar que desde el main() se puede modificar el nombre
|
||||
Fecha getFecha() const { return fechaAlta; }
|
||||
|
||||
void setNombre(char *nom);
|
||||
void setNombre(const char *nom);
|
||||
void setFecha(Fecha f);
|
||||
|
||||
bool operator==(Cliente c) const; // if (c1 ===c2)
|
||||
bool operator==(const Cliente& c) const; // if (c1 ===c2)
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ public:
|
||||
Fecha operator+(const int &i) const; //f+5
|
||||
|
||||
friend Fecha operator+(const int &i, const Fecha &f); //const por seguridad y & por velocidad
|
||||
friend ostream& operator<<(ostream& os, const Fecha& f);
|
||||
};
|
||||
|
||||
Fecha operator+(const int &i, const Fecha &f); //const por seguridad y & por velocidad
|
||||
|
||||
Reference in New Issue
Block a user