Guest User

Pacchetto.h

a guest
Feb 6th, 2013
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.85 KB | None | 0 0
  1.  
  2. #ifndef _PACCHETTO_REGALO_H
  3. #define _PACCHETTO_REGALO_H
  4. #include <iostream>
  5. #include <fstream>
  6.  
  7. using namespace std;
  8.  
  9. class PacchettoRegalo {
  10.       friend ostream & operator<< (ostream &, const PacchettoRegalo &);
  11.       friend istream & operator>> (istream &, PacchettoRegalo &);
  12.       protected:
  13.          char * Destinatario;
  14.          float Peso;
  15.          char * Forma;
  16.       public:
  17.          PacchettoRegalo (const char * D="", const float P = 0, const char * F="");
  18.          PacchettoRegalo (const PacchettoRegalo &);
  19.          const char * get_Destinatario() const {return Destinatario;}
  20.          float get_Peso() const {return Peso;}
  21.          const char * get_Forma() const{return Forma;}
  22.          ~PacchettoRegalo() {delete [] Destinatario; delete [] Forma;} //credo che non ha bisogno di essere dichiarata virtual
  23.          };
  24.          
  25. #endif
Advertisement
Add Comment
Please, Sign In to add comment