#include <fstream>
#include <iostream>
#include <cstring>
using namespace std;
#include "TextBuffer.h"
#include "Constructor.h"
#include "Clear.h"
#include "Read.h"
#include "Unpack.h"
#include "Book.h"
int main( int argc, char* argv[ ] ) {
fstream file;
int size;
streampos pos = 0;
Book b;
size = atoi( argv[1] );
TextBuffer buffer( size );
file.open( "inventory.xml", fstream::in );
while ( true ) {
if ( ( size=buffer.Read( file ) ) == 0 ) break;
buffer.Put( );
while ( b.Unpack( buffer ) )
cout << "Title = " << b.PrintTitle( ) << endl << endl << endl;
pos += size;
file.seekg( pos );
}
file.close( );
}
|