Advertisement
akela43

debugging cout

May 27th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #ifdef DEBUG
  2. #define DEBUG_MSG(str) do { std::cout << str << std::endl; } while( false )
  3. #else
  4. #define DEBUG_MSG(str) do { } while ( false )
  5. #endif
  6.  
  7. int main()
  8. {
  9.     DEBUG_MSG("Hello" << ' ' << "World!" << 1 );
  10.     return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement