10 Apr
2006
10 Apr
'06
2:06 p.m.
Paul Giaccone wrote:
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.
Ture, but format is a Boost library. You might have a look at: http://www.boost.org/libs/format/doc/format.html You can use format with a std::stringstream and then extract an std::string. Jeff