"Todd Shillam" <tshillam(@)hotmail.com> wrote in message
news:Dp********************@comcast.com...
Mike,
Thanks for the direction; however, I could use an example of how to call a
function in order to display a double in currency format. I was tinkering
with the local class, but I couldn't get it quite right.
You're welcome to post your code and point out where
you're having trouble. Even if I personally can't
help, I suspect someone here can (and hopefully will).
The function you'd call would be operator<<, but with
the stream imbued with a locale containing the 'money_put'
facet (written by you) which does the formatting you need.
That's what these 'facets' are for, allowing one to customize
output, but still do the output with the simple 'stream << object'
syntax.
When I get a chance, I'll try to throw together an example.
I'll probably need to do some refresher reading first, as
I haven't looked at or worked with this stuff for a while.
Writing this stuff does require doing some imo 'nonintuitive'
things.
I also suggest you get a copy of one or both of the books
whose web links I cited in my reply to "Sethalicious".
The second book gives more in-depth treatment to locales
and facets than does the first.
BTW please don't top-post here. Thank you.
-Mike