home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progc / fixed300.arj / BUG62.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-18  |  379 b   |  25 lines

  1. #if 0
  2. From:
  3. Subject: float overload resolution
  4. Status: Fixed in 3.0
  5. #endif
  6.  
  7. struct Fixed
  8.     {
  9.         Fixed();
  10.         Fixed(const Fixed & f);
  11.         Fixed(const float & f);
  12.         Fixed(long l);
  13.         Fixed(unsigned long l);
  14.     };
  15.  
  16. int main()
  17.     {
  18.     Fixed f;
  19.  
  20.     f =  1.0F;  // okay!
  21.     f = -1.0F;  // generates an error!
  22.  
  23.     return 0;
  24.     }
  25.