output formatting: setw & setiosflags
Claudio Bley
bley@cs.uni-magdeburg.de
Mon Jul 7 21:20:00 GMT 2003
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 / \
More information about the Gcc-help
mailing list