| www.delorie.com/archives/browse.cgi | search |
| From: | "Tony O'Bryan" <aho450s AT nic DOT smsu DOT edu> |
| 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 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
pneyz wrote:
> > This code:
> >
> > #include <stdio.h>
> >
> > int main(void)
> > {
> > printf("Hello world\n");
> >
> > return 0;
> > }
>
> I think he meant more along the lines of that versus:
>
> #include <iostream.h>
>
> 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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |