delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/05/02:51:15

Date: Thu, 5 Oct 2000 08:41:52 +0200 (CEST)
From: Dieter Demerre <ext DOT dieter DOT demerre AT siemens DOT be>
X-Sender: dd AT baby DOT siemens DOT ebp DOT ii3 DOT b-rail DOT be
To: djgpp AT delorie DOT com
Subject: Re: EXE file size (sorry if this is a duplicate)
In-Reply-To: <8rg4fg$sm6$1@nntp.itservices.ubc.ca>
Message-ID: <Pine.LNX.4.10.10010050838090.4745-100000@baby.siemens.ebp.ii3.b-rail.be>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

-----BEGIN PGP SIGNED MESSAGE-----

On Wed, 4 Oct 2000, David Grant wrote:

> How can I make my EXE files smaller.  I just made a Hello World program and
> it is like 200,000 bytes!

You can use some (ancient) run-time compression.  Don't know by heart now
but was based on sth like zip with a run-time decompression.

> I tried using gcc instead, but it didn't like my cout statement for some
> reason.  How can I do a printf instead?  It didn't seem to like that either.

the cout and cin streams and << (or for that matter >>) operators are
*strictly* c++.  To obtain the same (well known program) using
C-statements, do it like this:

#include <stdio.h>
int main(void)
{
  printf("Hello World\n"); /* or fprintf(stdout,"Hello World\n");
  return 0;
}

******* Groetjes vanwege ***** Greetings From *******
Dieter Demerre - http://www.angelfire.com/de/ddemerre
  ddemerre AT acm DOT org - ext DOT dieter DOT demerre AT siemens DOT be

Although this private and confidential e-mail has been sent 
to you through a personal Siemens account, it does NOT 
represent any official opinion of Siemens.

If you are not the intended recipient of this e-mail and 
have received it in error, please notify the sender by 
replying with 'received in error' as the subject and then 
delete it from your mailbox.

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQCVAwUBOdwivK5coohL2ygZAQEW9QQArsUDQ1Oy2pvNeNRYt5xeo6V0UVFhQpxb
+Uth8f9aGzH/2tsPFnD2Hu8wtOIZBArdfYwmfdLHyVFSzujfBaPEHXIspqG5BVh0
biUZ1ozp7I/1jIhBjqt29/7rQIIMInPKEsfcGWtgFrJBjpBGhSFaOHbLwwYyinmC
/wTU36BNnk4=
=4gHp
-----END PGP SIGNATURE-----


- Raw text -


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