Boost logo

Boost Users :

From: Miro Jurisic (macdev_at_[hidden])
Date: 2004-10-21 13:01:34


In article <989aceac04102110261565afaf_at_[hidden]>,
 Caleb Epstein <caleb.epstein_at_[hidden]> wrote:

> On Thu, 21 Oct 2004 04:47:01 -0400, Miro Jurisic <macdev_at_[hidden]> wrote:

> > A typesafe solution is to use "format ("%1%") % string(buf, len)" if I
> > understand the question correctly.
>
> That would only work for string types. The * width specifier can be
> used with ANY type, e.g.:
>
> printf ("|%*d|", 6, 42);
>
> Yields "| 42|".

You know, I am sure I knew that in the back of my head, but I only ever used it
for strings. Thanks.

meeroh


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net