C++ is a high-level computer proramming language It is used to develop
a wide variety of applications. C++ contains what C language does, and
its compilers are compatible with C syntax. The difference is that C++
adds the power of OOP (object-oriented programming).
To run C++ codes, you will need a C++ compiler. if you are using Windows,
you can download Borland C++Builder - http://www.codegear.com/downloads/free/cppbuilder
Include a File & Main Function
Let's see an example of C++:
#include <iostream>
int main(){
cout <<"Hello";
} In this program, the first line
include a header file "iostream":
#include <iostream>
A number sign (#) are directives for the preprocessor. the directive
#include <iostream> tells the preprocessor to include the iostream
standard file. This specific file (iostream) includes the declarations
of the basic standard input-output library in C++.
In this program, the second line defines the main function.
int main ()
All C++ programs start their execution from the main function. In other
words, all C++ programs have a main function, which is always the first
ones to be executed in any C++ program.
|