RE: [Dev-C++] c or c++. that is the question
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Louis G. <lg...@ya...> - 2003-04-23 15:39:40
|
Reid,
Does "stripped" mean no debug info ?
--- Reid Thompson <Rei...@at...> wrote:
> initial file sizes compiled on cygwin gcc/g++.
> these compiled on RH 7.2 gcc/g++ - not as large a difference, but a
> difference.
> Not sure how that would equate out if the program was 10K lines, or 100K
> lines, etc
> gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-108.7.2)
>
> -rwxr-xr-x 1 rthompso staff 13738 Apr 23 07:29 tst*
> -rwxr-xr-x 1 rthompso staff 14765 Apr 23 07:29 tstCpp*
> stripped
> -rwxr-xr-x 1 rthompso staff 4088 Apr 23 07:31 tstCpp*
> -rwxr-xr-x 1 rthompso staff 3272 Apr 23 07:31 tst*
>
> #include <stdio.h>
>
> int main(void)
> {
> printf("hello world\n");
> return 0;
> }
>
>
> #include <iostream>
> using namespace std;
>
> class Hello
> {
> public:
> void print(void)
> {
> cout << "hello world" << endl;
> }
> };
> int main(void)
> {
> Hello* p = new Hello;
> p -> print();
> delete p;
> return 0;
> }
>
> reid
>
>
> > -----Original Message-----
> > From: Khalid El-Kary [mailto:kha...@ho...]
> > Sent: Wednesday, April 23, 2003 12:19 AM
> > To: Dev...@li...
> > Subject: RE: [Dev-C++] c or c++. that is the question
> >
> >
> > One question:
> >
> > is there a extern "C++" like there's extern "C" ?
> >
> > if there's isn't, C code will be more useable, for both C++
> > and C programms.
> > (?)
> >
> >
> > Khalid
> > >Ioannis wearing his bullet-proof vest:
> > >
> > >
> > >Keep in mind that the prevalent X-Window library now is a
> > C++ one. Also
> > >most
> > >new GNU/Linux programs are being written in C++ these days...
> > >
> > >
> > >File sizes for the hello world program should not be different.
> > >
> > >
> > >
> > >
> > >Ioannis Vranos
> > >
> > >* Programming pages: http://www.noicys.freeurl.com
> > >* Alternative URL 1: http://run.to/noicys
> > >* Alternative URL 2: http://www.noicys.cjb.net
> > >
> > >
> > >Anti-racism movement: http://www.positive-youthfoundation.org
> > >Iraq Peace Pledge: http://www.peacepledge.org
> > >
> > >
> > >
> > >
> > >
> > >-----Original Message-----
> > >From: dev...@li...
> > >[mailto:dev...@li...] On Behalf Of Reid
> > >Thompson
> > >Sent: Wednesday, April 23, 2003 6:03 AM
> > >To: dev...@li...
> > >Subject: RE: [Dev-C++] c or c++. that is the question
> > >
> > >
> > >many reasons..., here's the first that comes to my mind....
> > >size:
> > >-rwxrwxrwx 1 Reid.Tho Domain U 19223 Apr 22 22:22 tstC.exe*
> > >-rwxrwxrwx 1 Reid.Tho Domain U 448506 Apr 22 22:29 tstCPP.exe*
> > >stripped:
> > >-rwxrwxrwx 1 Reid.Tho Domain U 10240 Apr 22 22:32 tstC.exe*
> > >-rwxrwxrwx 1 Reid.Tho Domain U 219136 Apr 22 22:32 tstCPP.exe*
> > >
> > >
> > >and ease of use is subjective :)
> > >
> > >#include <stdio.h>
> > >
> > >int main(void)
> > >{
> > > printf("hello world");
> > > return 0;
> > >}
> > >---------------------------
> > >#include <iostream>
> > >using namespace std;
> > >
> > >int main(void)
> > >{
> > > cout << "hello world";
> > > return 0;
> > >}
> > >
> > >or, since everything 'should' be a class/object:
> > >
> > >#include <iostream>
> > >using namespace std;
> > >
> > >class Hello
> > >{
> > > public:
> > > void print(void)
> > > {
> > > cout << "hello world" << endl;
> > > }
> > >};
> > >int main(void)
> > >{
> > > Hello* p = new Hello;
> > > p -> print();
> > > delete p;
> > > return 0;
> > >}
> > >-rwxrwxrwx 1 Reid.Tho Domain U 449115 Apr 22 22:51 tstCPP.exe*
> > >stripped
> > >-rwxrwxrwx 1 Reid.Tho Domain U 219648 Apr 22 22:55 tstCPP.exe*
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >reid
> > >-----Original Message-----
> > >From: jose isaias cabrera [mailto:ji...@fr...]
> > >Sent: Tuesday, April 22, 2003 10:17 PM
> > >To: dev...@li...
> > >Subject: [Dev-C++] c or c++. that is the question
> > >
> > >
> > >
> > >Greetings!
> > >
> > >Here is a question for all: why would anyone use c when c++
> > is so much
> > >easier?
> > >
> > >josé
> > >
> > >
> > >
> > >
> > >-------------------------------------------------------
> > >This sf.net email is sponsored by:ThinkGeek
> > >Welcome to geek heaven.
> > >http://thinkgeek.com/sf
> > _______________________________________________
> > >Dev-cpp-users mailing list
> > >Dev...@li...
> > >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
> >
> > _________________________________________________________________
> > Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> > http://join.msn.com/?page=features/featuredemail
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
>
=== message truncated ===
__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com
|