User:Legalize/Learn C++

= Why Learn C++? =


 * C++ can achieve high levels of performance without giving up expressiveness.
 * C++ is well suited to mobile and embedded devices where power consumption and executable size matter.
 * C++ is well suited to 3D graphics applications that need to maximize system performance.
 * C++ has deterministic management of the lifetime resources (no garbage collection).
 * C++ supports procedural, object, functional and generic programming styles.
 * C++ can operate in a very wide range of environments from embedded processors with minimal resources to the largest distributed supercomputer clusters.
 * C++ has a rich and knowledgeable community with open source and commercial offerings.
 * C++ interoperates well with the many thousands of C libraries.

= C++ is a Compiled Language =

Some languages, such as Python and JavaScript, are interpreted languages. You run the interpreter and supply it with either source files or interactively supply statements at a prompt. The interpreter reads source statements and interprets them into an underlying implementation.

C++ is a compiled language. Source statements are read by a compiler and translated into binary object code that is directly executable by the CPU.

While it is not impossible to create a C++ interpreter, this is typically implemented by compiling the C++ on the fly into memory and then executing the compiled code and not as a true interpreter.

= C++ is Statically Typed =

In C++, every entity referenced by your program is of a specific type: variables, constants, functions, structures, and classes all have well-defined, specific types. Static typing allows the compiler to understand all expressions in a program at the time of compilation. This is the fundamental property that allows the compiler to reduce expressions to an efficient representation of CPU machine instructions. Dynamically typed languages have a looser notion of a type where the types of values and variables are examined at runtime in order to decide how they are resolved.

= What do I Need to Program C++? =

To write C++ programs and execute them, you need some environment for preparing source code, submitting it to a compiler and running the resulting executable program. Traditionally this meant installing a compiler and/or development environment on your computer and using an editor to prepare source files for compilation.

ideone provides an online alternative whereby you can type your source code into a web form and perform the compilation and execution remotely. This is a quick way to experiment with small programs in a single source file, but becomes cumbersome for larger programs.

Visual Studio Community 2013 is a free version of Microsoft's Visual Studio product that provides a complete development environment: editor, compiler and debugger.

Xcode is a free development environment for MacOS that targets the Apple platforms MacOS and iOS.

Linux users might already have a C++ compiler installed, typically some version of gcc/g++.

Brave users may wish to try CLion, a new cross-platform IDE from JetBrains, makers of IntelliJ and ReSharper. This development environment uses CMake as the project system and is currently a free download available in their early access program.

= How do I use These Pages? =

These wiki pages do not attempt to cover every single last detail of C++, that's a job best left to the reference pages on this wiki.

These wiki pages assume that you are already familiar with the basic concepts of programming and that you have already performed some simple programming in another language.

= What Next? =

Continue to the simplest C++ program or what is a toolchain?