Senin, 05 April 2010

C + + programs have a main function

# include
The sentence that begins with the sign (#) is a directive to preprosesor. Not a line of code is executed, but the indications for the compiler. In this case the phrase # include notify preprosesor header compiler to include the iostream standard file. This specific file also includes declarations standard library I / O in pemrograman C + + and this file is included because its functions will be used later in the program. The function used is the court stands for the console out or display data to the console or screen.
# include
Because using getch, it is necessary declaration header file that stores declaration conio getch function.
int main ()
This line matches at the beginning of the declaration of main functions. main function is the starting point where all the C + + program will begin execution. Placed at the beginning, middle or end of the program, the contents of the main functions will always be executed first. Basically, the entire C + + programs have a main function. play followed by a pair of parentheses () as a function. in C + +, all functions followed by a pair of parentheses () where, can contain arguments therein. The contents of the main function will then be followed, a formal and written declaration of ({}), brace as in the example.
getch ();
The function getch () function is to receive from the user entered via the keyboard, but in this program, getch only serves to stop the process before the results window disappears. If the getch command does not exist, then the results window will appear briefly and then quickly disappeared, so the last command executed.
results

differences in use "... \ n"

Tidak ada komentar:

Posting Komentar

.::BY JUMBHO-MY AT HOME IN THE JEPARA CITY OF BEAUTIFUL::.