From 881b5de4e316be2989ea6ef37b733541dc681a69 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Mon, 30 May 2011 09:35:27 +0200 Subject: [PATCH] Use OutputDebugString for DD on Windows --- common/clitkDD.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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) -- 2.47.1