home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / GCC / GERLIB_USR08B.LHA / gerlib / examples / test / editfile_test / editfile_test.cc next >
Encoding:
C/C++ Source or Header  |  1993-12-12  |  1.1 KB  |  70 lines

  1. /*-- Rev Header - do NOT edit!
  2.  *
  3.  *  Filename : editfile_test.cc
  4.  *  Purpose  : testet eine Klasse, die das Bearbeiten von Files erleichtert
  5.  *
  6.  *  Program  : -
  7.  *  Author   : Gerhard Müller
  8.  *  Copyright: (c) by Gerhard Müller
  9.  *  Creation : Tue Sep  7 02:26:39 1993
  10.  *
  11.  *  compile  :
  12.  *
  13.  *  Compile version  : 0.1
  14.  *  Ext. Version     : 0.1
  15.  *
  16.  *  REVISION HISTORY
  17.  *
  18.  *  Date       C-Version  E-Version    Comment
  19.  *  ---------  ---------  -----------  -------
  20.  *
  21.  *-- REV_END --
  22.  */
  23.  
  24.     /*
  25.      * C-Includes, C-Definitionen
  26.      *
  27.      */
  28.  
  29.  
  30.     /*
  31.      * C++-Includes, C++-Definitionen
  32.      *
  33.      */
  34.  
  35. #include "../../add/baserel/editfile.h"
  36. #include "../../add/baserel/couta.h"
  37. #include "../../add/baserel/cina.h"
  38. #include "../../add/baserel/OwnError.h"
  39.  
  40. int main (void)
  41. {
  42.     char buffer[256];
  43.  
  44.     cout << "Filenamen:" << flush;
  45.     cin.tie(Output());
  46.     cin >> buffer;
  47.     cout << buffer;
  48.  
  49.     editfile myfile(buffer);
  50.  
  51.     if(err)
  52.     {
  53.         cout << err.have_error_string() << endl;
  54.         err.DosError(IoErr());
  55.         cout << err.have_error_string() << endl;
  56.     }
  57.     else
  58.     {
  59.         cout << myfile.strings << endl;
  60.  
  61.         for(int x=0;x<myfile.strings;x++)
  62.         {
  63.             cout << myfile.index[x] << endl;
  64.         }
  65.     }
  66.  
  67.     return(0);
  68. }
  69.  
  70.