RE: [Dev-C++] c or c++. that is the question
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Reid T. <Rei...@at...> - 2003-04-23 03:02:55
|
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*
=20
and ease of use is subjective :)
=20
#include <stdio.h>
=20
int main(void)
{
printf("hello world");
return 0;
}
---------------------------
#include <iostream>
using namespace std;
=20
int main(void)
{
cout << "hello world";
return 0;
}
=20
or, since everything 'should' be a class/object:
=20
#include <iostream>
using namespace std;
=20
class Hello
{
public:
void print(void)
{
cout << "hello world" << endl;
}
};
int main(void)
{
Hello* p =3D 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*
=20
=20
reid=20
-----Original Message-----
From: jose isaias cabrera [mailto:ji...@fr...]=20
Sent: Tuesday, April 22, 2003 10:17 PM
To: dev...@li...
Subject: [Dev-C++] c or c++. that is the question
=09
=09
=20
Greetings!
=20
Here is a question for all: why would anyone use c when c++ is so much =
easier?
=20
jos=E9
|