From: "Tony O'Bryan" Newsgroups: comp.os.msdos.djgpp Subject: Re: Hello world! Date: Sun, 04 Jan 1998 23:41:13 -0600 Organization: Southwest Missouri State University Lines: 35 Message-ID: <34B07279.1B31@nic.smsu.edu> References: <34B0250F DOT 4E7 AT netspace DOT net DOT au> <34B05477 DOT 4DEF AT nic DOT smsu DOT edu> <34B05EEB DOT FB68C746 AT bethany DOT edu> Reply-To: aho450s AT nic DOT smsu DOT edu NNTP-Posting-Host: marie.a40.smsu.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk pneyz wrote: > > This code: > > > > #include > > > > int main(void) > > { > > printf("Hello world\n"); > > > > return 0; > > } > > I think he meant more along the lines of that versus: > > #include > > int main (void) > { > cout << "Hello world" << endl; > return 0; > } > > Which is more of a C++ version as taught in the books. It compiles > signifigantly larger (I didn't strip it though). Using the iostreams links in another library (libgpp.a) which naturally will increase the size of the final program. Libraries aside, the code produced by a C++ compiler shouldn't be much larger (if at all) than the same code produced by a C compiler, though optimization options will have an effect. -- Tony O'Bryan http://www.geocities.com/SiliconValley/Park/7201