Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Lettera.h"
- Lettera::Lettera(const int C, const char * A, const int N, const char * F, const char * M, const char * D)
- :Manoscritto(C,A,N,F) {
- Mittente=new char[strlen(M)+1];
- Destinatario=new char[strlen(D)+1];
- strcpy(Mittente, M);
- strcpy(Destinatario, D);
- }
- Lettera::Lettera(const Lettera & L) : Manoscritto(L) {
- Mittente=new char[strlen(L.Mittente)+1];
- Destinatario=new char[strlen(L.Destinatario)+1];
- strcpy(Mittente, L.Mittente);
- strcpy(Destinatario, L.Destinatario);
- }
- void Lettera::visualizza_dati() const {
- cout << Mittente << " " << Destinatario << endl;
- }
- void Lettera::memorizza_dati(){
- cout << "Inserisci i dati: \n";
- cin >> Mittente >> Destinatario;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement