From: Simon Rit Date: Mon, 30 May 2011 07:35:27 +0000 (+0200) Subject: Use OutputDebugString for DD on Windows X-Git-Tag: v1.3.0~335 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=881b5de4e316be2989ea6ef37b733541dc681a69;p=clitk.git Use OutputDebugString for DD on Windows --- diff --git a/common/clitkDD.h b/common/clitkDD.h index c5b5295..f43db9d 100644 --- a/common/clitkDD.h +++ b/common/clitkDD.h @@ -19,10 +19,20 @@ #define clitkDD_h #include - +#ifdef WIN32 +# include +#endif // David's debug -#define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;std::cout.flush(); +#ifdef WIN32 +# define DD(a) { \ + std::ostringstream ossDD; \ + ossDD << #a " = [ " << a << " ]" << std::endl; \ + OutputDebugString(ossDD.str().c_str()); \ + } +#else +# define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;std::cout.flush(); +#endif #define DDV(a,n) { std::cout << #a " = [ "; for(unsigned int _i_=0; _i_ void _print_container(T const& a)