I have following code:
Tools::Logger.Log(string(GetLastError()), Error);
GetLastError() returns a DWORD a numeric
GetLastError()
DWORD
You want to read up on ostringstream:
#include #include int main() { std::ostringstream stream; int i = 5; stream << i; std::string str = stream.str(); }