home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16118 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.8 KB  |  56 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!infonode!vegas!gfung
  3. From: gfung@vegas.daisy.com (gfung@dazixca.ingr.com)
  4. Subject: Re: the COOL library
  5. Message-ID: <1992Nov11.220027.23650@infonode.ingr.com>
  6. Sender: usenet@infonode.ingr.com (Usenet Administrator)
  7. Reply-To: gfung@vegas.daisy.com
  8. Organization: Dazix an Intergraph Company
  9. References: <MCGRANT.92Nov10171811@rascals.stanford.edu>
  10. Distribution: usa
  11. Date: Wed, 11 Nov 1992 22:00:27 GMT
  12. Lines: 42
  13.  
  14.  
  15. I also found out there was a bug in the vector class in the ice package.
  16. In the Vector.h class :
  17.  
  18.  
  19. template <class Type>
  20. class Vector<Type> : public Vector {
  21. protected:
  22.   Type* data;                   // Pointer to allocated storage
  23.   static Type##_Vector_Compare compare_s;   // Pointer operator== function
  24.   void grow (long min_size);            // Make the Vector bigger
  25.  
  26. public:
  27.   Vector<Type> ();              // Vector v;
  28.   Vector<Type> (unsigned long);         // Vector v(10);
  29.   Vector<Type> (void*, unsigned long);      // Vector with static storage
  30.   Vector<Type> (unsigned long, const Type&);    // Vector v(10,x);
  31.                                ^^^^^^^^^^^^
  32.   Vector<Type> (unsigned long, int, ...);   // Vector v(10,3,x,y,z);
  33.                                ^^^
  34.   ....
  35.  
  36. If I declare a Vector<int> class with only two arguments.
  37. i.e. Vector<int> v(10,3)
  38.  
  39. This declaration will satisfy both of the above constructors and causes 
  40. compilation error.
  41.  
  42. Does anyone have the fixes for it?
  43.  
  44.  
  45. Thanks
  46. Glenn
  47.  
  48. ---
  49. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  50. Glenn Fung                   | Email: gfung@dazixca.ingr.com
  51. Intergraph Electronics       | 
  52. 381 East Evelyn Avenue       | Tel: (415)691-6420
  53. Mountain View, CA 94041      | Fax: (415)691-0138
  54. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  55.  
  56.