home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / yacl-012.zip / uidemo / bigstrvw / main.cxx < prev    next >
C/C++ Source or Header  |  1995-04-08  |  570b  |  30 lines

  1.  
  2. #include "ui/applic.h"
  3. #include "appwin.h"
  4. #include "bigstrv.h"
  5. #include <fstream.h>
  6.  
  7. int UI_Application::Main (int, char* [])
  8. {
  9.     CL_StringSequence model;
  10.     ifstream dataFile ("newsgrps.lst");
  11.     if (!dataFile) {
  12.         CL_Error::Warning ("File newsgrps.lst not found.");
  13.         return 0;
  14.     }
  15.     CL_String line;
  16.     do {
  17.         line.ReadLine (dataFile);
  18.         if (dataFile.eof()) break;
  19.         model.Add (line);
  20.     } while (1);
  21.     dataFile.close();
  22.  
  23.     MakeTopWindow (new AppWindow (model));
  24.     Run();
  25.     return 0;
  26. }
  27.  
  28.  
  29.  
  30.