home *** CD-ROM | disk | FTP | other *** search
- Path: news.mcs.net!not-for-mail
- From: mryba@MCS.COM (Michal L. Rybarski)
- Newsgroups: comp.sys.amiga.programmer
- Subject: C vs. C++ -> SAS/C binary size
- Date: 17 Feb 1996 14:37:30 -0600
- Organization: MCSNet Services
- Message-ID: <4g5eaa$km7@Venus.mcs.com>
- NNTP-Posting-Host: venus.mcs.com
- X-Newsreader: TIN [version 1.2 PL2 (KSD)]
-
- OK this is a test code I've tried to compile:
-
- #include <stdio.h>
- void main(void)
- {
- printf("%s","Hello!");
- }
-
- SLINK Complete - Maximum code size = 5788 ($0000169c) bytes
- Final output file size = 9308 ($0000245c) bytes
-
- versus:
-
- #include <iostream.h>
- void main(void)
- {
- cout << "Hello!";
- }
-
- SLINK Complete - Maximum code size = 38412 ($0000960c) bytes
- Final output file size = 63736 ($0000f8f8) bytes
-
-
- Why such a big difference in size of executables? I understand that C++
- i/o is object oriented so, I imagine, it is more complex therefore it should
- take longer to compile but why there should be any difference in the
- size of the final binary?
-
- Have I missed to set some vital settings?
-
- please, help.
- Michal
-