Date: Wed, 2 Sep 1998 11:06:59 +0300 (IDT) From: Eli Zaretskii To: Endlisnis 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.