home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 20.ddi / MFC / SRC / DUMPFLT.CP_ / DUMPFLT.CP
Encoding:
Text File  |  1993-02-08  |  1.1 KB  |  51 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library. 
  2. // Copyright (C) 1992 Microsoft Corporation 
  3. // All rights reserved. 
  4. //  
  5. // This source code is only intended as a supplement to the 
  6. // Microsoft Foundation Classes Reference and Microsoft 
  7. // QuickHelp and/or WinHelp documentation provided with the library. 
  8. // See these sources for detailed information regarding the 
  9. // Microsoft Foundation Classes product. 
  10.  
  11. #include "stdafx.h"
  12. #include "float.h"
  13.  
  14. #ifdef AFX_DBG1_SEG
  15. #pragma code_seg(AFX_DBG1_SEG)
  16. #endif
  17.  
  18. #ifdef _DEBUG
  19. #undef THIS_FILE
  20. static char BASED_CODE THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23. /////////////////////////////////////////////////////////////////////////////
  24. // Diagnostic Stream output for floating point numbers
  25.  
  26. #ifdef _DEBUG
  27.  
  28. CDumpContext&
  29. CDumpContext::operator<<(float f)
  30. {
  31.     char szBuffer[32];
  32.  
  33.     _gcvt(f, FLT_DIG, szBuffer);
  34.     OutputString(szBuffer);
  35.  
  36.     return *this;
  37. }
  38.  
  39. CDumpContext&
  40. CDumpContext::operator<<(double d)
  41. {
  42.     char szBuffer[32];
  43.  
  44.     _gcvt(d, DBL_DIG, szBuffer);
  45.     OutputString(szBuffer);
  46.  
  47.     return *this;
  48. }
  49.  
  50. #endif
  51.