This seems to work ok using boost::format:
#include <iostream>
#include
Lynn Allan wrote:
I've been puzzled about doing the equivalent of: printf("%.5s\n", myBuf10); and also: printf("%.*s\n", 5, myBuf10); Note: newbie with std::string ... using Microsoft vc7.1 compiler
Thanks.
string isn't a Boost library. You're unlikely to get any help here. Try posting to comp.lang.c++ on Google Groups.