Experience in C++, C#, Java and Process : Living in Montreal

* What is my technical experience as a software developer

* What I have learned in the software business

* Where I am heading to in my career

* How to process in a project

Thursday, March 03, 2005

Set width and precision in iostream of STD

1. Call precision and width close to cout;
2. fixed to enforce to show a float as 23.45 format

int nLine = 1; for ( int i = 0; i < 100; i += 5)
{
cout.precision( 2); cout.width( 6);
cout << fixed << inch2cm( i) << " ";
if ( nLine % 10 == 0)
{ cout << endl; }
nLine++;
}

1 Comments:

  • At 8:31 PM , Anonymous Anonymous said...

    ...please where can I buy a unicorn?

     

Post a Comment

Subscribe to Post Comments [Atom]

<< Home