home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 15960 < prev    next >
Encoding:
Internet Message Format  |  1992-11-09  |  852 b 

  1. Path: sparky!uunet!olivea!spool.mu.edu!umn.edu!csus.edu!netcom.com!ort
  2. From: ort@netcom.com (David Oertel)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Debugging output
  5. Summary: RE: debugging output
  6. Message-ID: <1992Nov9.112051.21350@netcom.com>
  7. Date: 9 Nov 92 11:20:51 GMT
  8. References: <spuler.720931050@coral>
  9. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  10. Lines: 17
  11.  
  12.  
  13.  
  14. >> I was wondering whether anyone has any suggestions as to how to use the neat
  15. >> operator << to produce debugging output in a way that it can be removed
  16. >> easily from production code.  The obvious method is:
  17.  
  18. >> #ifdef DEBUG
  19.    >> cerr << .....
  20. >> #endif
  21.  
  22. >> but I'd like to avoid the #ifdef -#endif lines.
  23.  
  24.     I didn't see the truly obvious answer to this post.  That is to
  25.     put the #ifdef,#endif around the body of an inline function.
  26.  
  27.     ort@netcom.com
  28. -- 
  29.