Posts

Showing posts from June, 2014

Using a subset of the boost libraries in Windows

Image
For many C++ applications I very much want to use the Boost libraries, just not the whole set. This post explains how to use the bcp tool to create a subset of the Boost libraries in order to leave out unnecessary libraries and tailor it to the needs of your project. One nice thing about bcp is that it can be run at any time so as to update your Boost dependencies as and when the need arises.

Converting a SYSTEMTIME to a std::string in C++

Image
A short recipe outlining how to output a SYSTEMTIME value as a std::string. The example format will be "YYYY-MM-DD HH:MM:SS.MMM" I specifically wanted to include milliseconds. In this example I employ three possible techniques: 1. MFC CString 2. std::ostringstream 3. sprintf