delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/19/13:35:55

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: PEST or BUG
Date: Wed, 19 Nov 1997 09:14:29 -0800
Organization: Alcyone Systems
Lines: 26
Message-ID: <34731E75.1FF84D6E@alcyone.com>
References: <3472DBB5 DOT 71A7 AT nortel DOT ca>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ian Chapman wrote:

>      this is a pest and I can live with it.  My preference is to have
> cout in dec at every call and only stream through hex when explicitly
> called.  As some one who is involved in applications close to the
> hardware I need hex.  I must wonder what this will do to many of the
> libs and class libs.

Easy.  Change this:

    cout << "Ia in hex is ..." << hex << Ia << endl;

to this:

    cout << "Ia in hex is ..." << hex << Ia << dec << endl;

That is, merely set the base output back to decimal after you've printed
your (rare) hex value.

-- 
         Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
                       Alcyone Systems / http://www.alcyone.com/max/
  San Jose, California, United States / icbm://+37.20.07/-121.53.38
                                     \
   "Since when can wounded eyes see / If we weren't who we were"
                                   / Joi

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019