Advertisement
Guest User

ElencoManoscritti.cpp

a guest
Jan 31st, 2013
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include "ElencoManoscritti.h"
  2.  
  3. Elenco::Elenco() {
  4.              t=0;
  5. }
  6.  
  7. void Elenco::push(const T & m) {
  8.      E[t]=m;
  9.      t++;
  10.      }
  11.      
  12. void scrivi(const char * a){
  13.    Manoscritto m;
  14.    ofstream outfile(a, ios::out);
  15.    cout << "Inserisci codice, autore, numero di pagine e formato: \n";
  16.    cout << "->";
  17.    while(cin >> m.Codice >> m.Autore >> m.numpag >> m.Formato){
  18.        outfile << m.Codice << " " << m.Autore << " " << m.numpag << " " << m.Formato << endl;
  19.        cout << "->";
  20.    }
  21.    outfile.close();
  22. }
  23.  
  24. bool Elenco::full()const{
  25.      return t==N;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement