www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/02/07:21:23

Date: Wed, 2 Sep 1998 11:06:59 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Endlisnis <s257m AT unb DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: Am I retarded -or- Why is my exe size so big?!?
In-Reply-To: <35EC64A0.608E33C4@unb.ca>
Message-ID: <Pine.SUN.3.91.980902110633.517V-100000@is>
MIME-Version: 1.0

On Tue, 1 Sep 1998, Endlisnis wrote:

> >       cout << DOS << " should be 0xC1234\n";
> > 
> >     It should say something like this instead:
> > 
> >       cout << hex << (lword)DOS << " should be 0xC1234\n";
> 	Why is that wrong?  It did what I expected.  Wouldn't it just call:
> ostream& operator << (ostream&,void*);

Not for me, it doesn't.  It dereferenced DOS and printed the value of
that (random) location, that happened to be 1.

That was with GCC 2.7.2.1, maybe 2.8.1 changed that.  My C++ knowledge
is minimal, so I don't know what's right and what's not.  Printing a
pointer is inherently non-portable anyway.

- Raw text -


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