home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!uwm.edu!linac!att!att!allegra!alice!bs
- From: bs@alice.att.com (Bjarne Stroustrup)
- Newsgroups: comp.lang.c
- Subject: Re: Parameter passing & data abstraction
- Message-ID: <24524@alice.att.com>
- Date: 31 Dec 92 05:18:48 GMT
- Article-I.D.: alice.24524
- References: <1992Dec30.184135.1963@organpipe.uug.arizona.edu>
- Organization: AT&T Bell Laboratories, Murray Hill NJ
- Lines: 44
-
-
-
- dave@cs.arizona.edu (Dave Schaumann @ University of Arizona) writes
-
- > Another would be to switch to C++, but I'm not especially keen to do that,
- > in part because the resulting executable (at least for g++) tend to be
- > 300+K in size, even for fairly simple programs.
-
- That cannot be a C++ problem. For
-
- #include <stdio.h>
-
- main()
- {
- printf("Hello, World\n");
- }
-
- I get
-
- text data bss dec hex
- 12288 6144 7624 26056 65c8
- when compiling as a C++ program, and
-
- text data bss dec hex
- 12288 6144 7612 26044 65bc
-
- when compiling as a C program. Changing the example to use
- specific C++ facilities
-
- #include <iostream.h>
-
- main()
- {
- cout << "Hello, World\n";
- }
-
- I get
-
- text data bss dec hex
- 17408 2048 0 19456 4c00
-
-
- Ofcourse G++ may be different, but that difference ought to
- show up in GNU C also, then
-