delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/26/21:07:23

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: cout problem resolved - sorry...
Date: Thu, 26 Dec 1996 18:40:54 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 27
Message-ID: <32C33736.70C8@cs.com>
References: <fI0vygHkl23U092yn AT primenet DOT com> <01bbf36b$90b43500$3cb05380 AT maan-m DOT -hamze>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp218.cs.com
Mime-Version: 1.0
CC: Jeff Bishop <jeffbis AT primenet DOT com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Maan M. Hamze wrote:
> 
> You'll get the same amount, or close enough to it, even when you use other packages like
> Visual C++, Borland C++ ver 5 etc...etc.....  The reason is that the exe includes all the info
> needed to run your program specially that DJGPP produces 32-bit protected mode apps.
> This overhead is necessary and unavoidable.
> Also, get into the habit of using:
> int main(void) or int main() for your C++ programs :):) (the void between
> the paranthesis is optional in C++).
> but not void main().
> How is that John Aldrich? :)

Excellent, thanks.  That way I don't have to get on his case when he
posts sample code on here for us to debug.  ;)

Actually, there is tremendously greater overhead in C++ than in C.  A
basic "hello world" using C compiles to about 50k; while a C++ "hello
world" compiles to the figure mentioned above.  It's an unavoidable
aspect of the C++ language on a 32-bit compiler.  The FAQ mentions a
number of ways to reduce the size of DJGPP executables in section 8.15.

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |        fighteer AT cs DOT com         |
| Plan:  To find ANYONE willing to |   http://www.cs.com/fighteer   |
| play Descent 2 on DWANGO!        | Tagline: <this space for rent> |
---------------------------------------------------------------------

- Raw text -


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