Click here to Skip to main content
15,885,366 members
Articles / Programming Languages / C++98

Debug Print in Variadic Template Style

Rate me:
Please Sign up or sign in to vote.
4.81/5 (10 votes)
12 Apr 2016CPOL6 min read 39.2K   484   26  
Debug Print using C++11 Variadic Template
#include "StdAfx.h"
#include "DebugPrint.h"
#include <iostream>
#include <Windows.h>

DebugPrint::DebugPrint(void)
{
}

DebugPrint::~DebugPrint(void)
{
}

void DebugPrint::Process(const std::wstring& str)
{
#ifdef _DEBUG
	OutputDebugStringW( str.c_str() );
#endif
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Singapore Singapore
Shao Voon is from Singapore. His interest lies primarily in computer graphics, software optimization, concurrency, security, and Agile methodologies.

In recent years, he shifted focus to software safety research. His hobby is writing a free C++ DirectX photo slideshow application which can be viewed here.

Comments and Discussions