I tried the follwoing using bloddshed dev CPP compiler.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
printf("Hello World!\n");
system("PAUSE");
return 0;
}
then I tried this version
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
cout << "Hello World!" << endl;
system("PAUSE");
return EXIT_SUCCESS;
}
the executable for the C style version was 15.4Kb on my system. The
C++ style was 464KB in sized. The difference is the library. I gues it
can be argued that you can just use the C library and that would be
that. I still say that when you want something that goes strait to the
point then C is the answer. Mostly for controling the hardware and
such API's. For everything else C++. Well, everything else that
requires speed right.
I'm not bashing C++. C++ is cool. C++ is raw power. It is so obcenly
powerfull that is not allowed in some souther states. That said, plain
vannilla C still has its place.