Re: output formatting: setw & setiosflags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 07, 2003 at 11:19:27AM -0400, Justin Miller wrote:
> Is there an alternate to using setw and setiosflags since they don't
> appear to be present in gnu gcc?

What makes you think that? Does this mean the following code doesn't
compile on your system? What's the problem?

//// 

#include <ios>
#include <iomanip>
#include <iostream>

int main()
{
  std::cout << std::setiosflags (std::ios::showbase | std::ios::showpos)
	    << std::setw (10) << 12345 << std::endl;
}

////

-- 
Claudio Bley                                 ASCII ribbon campaign (")
Debian GNU/Linux user                         - against HTML email  X 
http://www.cs.uni-magdeburg.de/~bley/                     & vCards / \


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux