In answer to one of my recent questions, it was suggested that I use a function in boost to solve my problem. This is my first time using boost so I added the following .hpp file
#include <boost/algorithm/string.hpp>
and function call
boost::replace_all(marketPrices, "\\:", "-COLON-");
to my source file, then ran make to build my application using g++ as normal.
At this point I realized I had not added any new library to the link step in my makefile and fully expected the link step to fail. To my surprise it did not fail - not only that but the code ran exactly as it should have done without any complaint.
This surprises me to say the least - how did g++ know what to link to and why did it automatically do so? Or am I missing something fundamental with the way the boost libraries operate? I know that boost uses a lot of templating and this is an aspect of C++ that I am not overly familiar with so I am wondering if perhaps this has something to do with what I am seeing.