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

Re: C++ noshowbase ignored



On Tue, 03 Feb 2009 18:46:49 -0500, Todd Denniston wrote:

> Mike -- EMAIL IGNORED wrote, On 02/03/2009 02:47 PM:
>> In FC7, the line"
>> 
>> ...
>>    cout << "a = 0x" << setfill('0') << hex << noshowbase <<
>>                      setw(8) << a << dec << setfill(' ') << endl;
>> ...
>> 
>> results in:
>> 
>> a = 0x0x91a1218
>> 
>> Is there something I can do about this?
>> 
>> 
> Mr. Obvious asked, "how 'bout changing the code like so:" ...
>     cout << "a = " << setfill('0') << hex << noshowbase <<
>                       setw(8) << a << dec << setfill(' ') << endl;
> ...
> 
> or for more pain
> http://www.open-std.org/JTC1/sc22/wg21/docs/lwg-defects.html#183 cout <<
> resetiosflags(ios_base::showbase) ????
> 
[...]

Mr. Clearly Stated replied, "the code presented is
merely a model to show the problem; the real code
with the problem is much more complex."

Mike.


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