home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_C / CL187A.ZIP / EXAMP204.CPP < prev    next >
C/C++ Source or Header  |  1994-03-15  |  657b  |  33 lines

  1. // Container Lite (CL v 1.87a)
  2. // (C) Copyright John Webster Small 1994
  3. // All rights reserved
  4. // examp204.cpp -- link with cl.obj
  5.  
  6. // #define CL_NO_TEMPLATES
  7.  
  8. #include "cl.h"
  9. #if defined(CL_NO_TEMPLATES)
  10.     #define   ITEM  float
  11.     #define   CL_WELL_ENDOWED
  12.     #define   CL    CL_float
  13.     #include "cl.hf"
  14. #else
  15.     CL_WELL_ENDOWED(float)
  16.     #define CL_float CL<float>
  17. #endif
  18.  
  19. #define floatFile "floats.tmp"
  20.  
  21. main()
  22. {
  23.     CL_float cf(CL_ANDS,10);
  24.     for (float i = 1.0; cf.pushNew(&i); i++);
  25.     cf.save(floatFile);
  26.     cf.allClr();
  27.     cf.load(floatFile);
  28.     cout << "Count to 10: " << endl;
  29.     while (cf.unQDelAsg(&i))
  30.         cout << i << endl;
  31.     return 0;
  32. }
  33.