Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- class Tempo
- {
- public:
- // Costruttore senza parametri
- Tempo();
- //Costruttore 1 parametro
- Tempo(int a);
- // Costruttore 3 parametri
- Tempo(int a, int b, int c);
- // Tempo in secondi
- int inSecondi();
- // Overloading +
- Tempo operator+(Tempo &t);
- // Overloading -
- Tempo operator-(Tempo &t);
- // Dichiarata friend per accedere ai membri privati
- friend std::ostream& operator<<(std::ostream& o, Tempo& t);
- private:
- int m_ore;
- int m_min;
- int m_sec;
- };
- std::ostream& operator<<(std::ostream& o, Tempo& t);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement