#include #include "Text.h" #include "Book.h" #include "Volume.h" #include int main() { cout << "Gestione biblioteca" << endl; vector< Text * > texts; texts.push_back( new Book( "Dante Alighieri", "La Divina Commedia") ); texts.push_back( new Book( "Alessandro Manzoni", "I promessi sposi") ); texts.push_back( new Volume( "Isac Asimov", "Trilogia", 1 ) ); texts.push_back( new Volume( "Isac Asimov", "Trilogia", 2 ) ); texts.push_back( new Volume( "Isac Asimov", "Trilogia", 3 ) ); cout << "-------------" << endl; vector< Text * >::const_iterator i; for ( i = texts.begin(); i != texts.end(); i++ ) ( * i )->print(); vector< Text * >::iterator j; for ( j = texts.begin(); j != texts.end(); j++ ) delete ( * j ); return 0; }