Difference between revisions of "C++"

m
Line 1: Line 1:
C++ is a compiler language. A compiler converts between machine language and english. A compiler, unlike an interpreter, reads the program fully, then executes it. An interpreter, on the other hand, reads it line by line as the program is being executed. The advantage to a compiler is that you can use object oriented programming. This is when rather than executing the program in the order you type the code in, it is executed based on objects. The order can be specified. In C++, functions are common. You can choose what function to execute when. C++ always looks for a function named "main" when the executable file begins running, so you must create it. The function borrows memory from the hard drive and onto a ram. The memory takes the form of a variable, with a value. Another value is returned from the ram to the hard drive using the return statement. If the function variable has type "void", no value is returned. Functions can be created and named, but if you name a function "main", make sure that it is supposed to be the first function to execute. The # include statement includes a file and its functions. Do not include a file if it has the main function. Most include files take the extension ".h", which is the extension for C++ header files. The C++ source file will have the extension ".cpp" or ".cc". The executable file will have the extension ".exe".
+
C++ is a compiler language. A compiler converts between machine language and English. A compiler, unlike an interpreter, reads the program fully, then executes it. An interpreter, on the other hand, reads it line by line as the program is being executed. The memory takes the form of a variable, with a value. Another value is returned from the ram to the hard drive using the return statement. If the function variable has type "void", no value is returned. Functions can be created and named, but if you name a function "main", make sure that it is supposed to be the first function to execute. The # include statement includes a file and its functions. Do not include a file if it has the main function. Most include files take the extension ".h", which is the extension for C++ header files. The C++ source file will have the extension ".cpp" or ".cc". The executable file will have the extension ".exe".

Revision as of 18:17, 26 August 2009

C++ is a compiler language. A compiler converts between machine language and English. A compiler, unlike an interpreter, reads the program fully, then executes it. An interpreter, on the other hand, reads it line by line as the program is being executed. The memory takes the form of a variable, with a value. Another value is returned from the ram to the hard drive using the return statement. If the function variable has type "void", no value is returned. Functions can be created and named, but if you name a function "main", make sure that it is supposed to be the first function to execute. The # include statement includes a file and its functions. Do not include a file if it has the main function. Most include files take the extension ".h", which is the extension for C++ header files. The C++ source file will have the extension ".cpp" or ".cc". The executable file will have the extension ".exe".