|
Hello World in C/C++ |
|
|
|
Here are two examples of programming. Today we'll see how to program a Hello World in C and C++
There aren't many differences between the examples, cause they're practically the same, but of course, the first example, the one in C, will work with a C++ compiler, but the C++ one won't work with a C compiler.
Hello World in C
Código:
#include <stdlib.h>
int main(int argc, char *argv[]) {
printf("He");
return 0;
}
And now the example of Hello World in C++, it's practically the same, not much difference, but instead of using the stdlib.h we use the iostream library.
Hello World in C++
Código:
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
std::cout << "Hello World" << endl;
return 0;
}
| Keywords: Hello World in C/C++ ,
Hello World in C/C++ ,
programming, ide, visual studio, hello, world, |
| Date:
19-03-2010 4:05:14 |
Author:
Luffy |
Views:
3925 |
Related articles...Hello World in C/C++
0 comments in Hello World in C/C++
|