www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/21/08:32:44

From: davidm AT netscape DOT com
Newsgroups: alt.msdos.programmer,comp.os.msdos.djgpp,rec.games.design,rec.games.programmer
Subject: Re: C or C++
Date: Mon, 19 May 1997 20:46:07 -0700
Organization: Another Netscape News Server User
Lines: 21
Message-ID: <33811E7A.28E81CA2@netscape.com>
References: <01bc64bb$79a13040$69e22499 AT syntaxlogic DOT earthlink DOT net>
NNTP-Posting-Host: h-207-1-145-180.mcom.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Alex Kain wrote:
> 
> What are the advantages of programming a CRPG in C++?  After comparing
> compiled versions of the same game in DJGPP and using Allegro, the C
> file
> is only half the size as the C++ file!  Is it really worth it?
> --
> Alex Kain
> syntaxlogic AT earthlink DOT net
> http://home.earthink.net/~syntaxlogic/

I having a feeling that your linker is not stripping out unused librarycode.
If you write C in C++ the file size is the same. If you write C++ in C++ your
code size tends to be larger although you should have fewer lines of code. For
most games I would guess that code size if pretty irrelevant when compared
with the amount of space required for graphics/sound/ other data. Unless of
course you just miss one of the magic numbers ( ie run under 8 megs, or fit of
a CD-ROM).
--
David Matiskella
davidm AT netscape DOT com

- Raw text -


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