C++ is a high-level and and an object orientated programming language (it can have parts known as classes or object). Why C++? It is an extension to C (adds new features)
- The compiler checks the code and is needed to translate your code for your hardware or computer (object file)
- it produces a stand-alone executable program
- process diagram: diagram
- compiling is used for C, C++ and Pascal
- compilers exist for multiple CPUs
- Compile a .c file with
g++ filename.c -o executablefilename
Also possible: - interpreting:
- executes the instructions directly
- every time you run the program you need the interpreter
- for scripting languages (Perl, JavaScript)
- Java ues a mix of the two
- combines the object files to single executable
- links library files
Libraries are precompiled 'packages' for reuse in other programs.
- use
#include <library>to include a library in the program
- standard:
- iostream: for input and output capabilities
- visual studio compiler (Desktop development with C++)
- cin.ignore
- cin<< (output) and cin>> (intput)
sites used: