#include <windows.h>
#include <iostream>
#include <string>
using namespace std;
template <typename R> std::string ToString(R value)
{
return std::to_string(value);
}
int main()
{
int a = 10;
DWORD b = 20;
double c = 12145.1212;
float d = 124.f;
printf("int: %s DWORD: %s, double: %s, float: %s\n",
ToString<int>(a).c_str(),
ToString<DWORD>(b).c_str(),
ToString<double>(c).c_str(),
ToString<float>(d).c_str());
system("pause");
return 0;
}