Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: is this code valid?

Reply
Thread Tools

Re: is this code valid?

 
 
jason.cipriani@gmail.com
Guest
Posts: n/a
 
      06-08-2008
On Jun 5, 4:28 am, Triple-DES <DenPlettf...@gmail.com> wrote:
> On 4 Jun, 17:57, "jason.cipri...@gmail.com" <jason.cipri...@gmail.com>
> wrote:
>
> > Do you happen to know if C++0x is introducing a convenient ostream
> > interface that makes things like:

>
> > printf("%+9.4f %8.3f\n", value1, value2);

>
> > Slightly easier to deal with than:

>
> > cout << showpos << fixed << setw(9) << setprecision(4) << value1 <<
> > noshowpos << setw( << setprecision(3) << value2 << endl;

>
> Boost::format provides typesafe, "printf-like" formatting. If I'm not
> mistaken Andrei Alexandrescu also published a similar utility.


Thanks for pointing this out; I messed around with it and have been
using it for a couple of days now. It's really pretty cool. Maybe I'll
start dumping the printf habit after all. Maybe.

Jason
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the difference between code inside a <script> tag and code in the code-behind file? keithb ASP .Net 1 03-29-2006 01:00 AM
Fire Code behind code AND Javascript code associated to a Button Click Event =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?= ASP .Net 4 02-11-2004 07:31 AM
Re: Code Behind vs. no code behind: error Ben Miller [msft] ASP .Net 1 06-28-2003 01:46 AM
Re: C# Equivalent of VB.Net Code -- One line of code, simple Ian ASP .Net 0 06-25-2003 01:14 PM
Re: C# Equivalent of VB.Net Code -- One line of code, simple Ron ASP .Net 1 06-24-2003 07:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57