<h2 id="Linker-or-Link-editor-(wikipedia:-linker)">Linker or Link editor (<a href="http://en.wikipedia.org/wiki/Linker_(computing%29">wikipedia: linker</a>)<a class="anchor-link" href="#Linker-or-Link-editor-(wikipedia:-linker)">¶</a></h2><ul>
<li>takes one or more object files (generated by a compiler)</li>
<li>combines them into a single executable program.</li>
<h1 id="A-first-C++-program">A first C++ program<a class="anchor-link" href="#A-first-C++-program">¶</a></h1><h2 id="Open-the-file-'hello.cpp'">Open the file 'hello.cpp'<a class="anchor-link" href="#Open-the-file-'hello.cpp'">¶</a></h2>
<h1 id="CMake-default-generator">CMake default generator<a class="anchor-link" href="#CMake-default-generator">¶</a></h1><p>In general, Makefiles have to be generated with CMake. For this, the procedure is:</p>
<h3 id="Type-conversion-(needs-to-be-explicitly-converted)">Type conversion (needs to be explicitly converted)<a class="anchor-link" href="#Type-conversion-(needs-to-be-explicitly-converted)">¶</a></h3>
<p><a href="http://en.wikibooks.org/wiki/C%2B%2B_Programming/Programming_Languages/C%2B%2B/Code/Statements/Flow_Control#if_.28Fork_branching.29">wikipedia: if then else</a></p>
<h3 id="switch-&-case:-decisional-branching-with-cases"><strong>switch & case</strong>: decisional branching with cases<a class="anchor-link" href="#switch-&-case:-decisional-branching-with-cases">¶</a></h3>
<p><a href="http://en.wikibooks.org/wiki/C%2B%2B_Programming/Programming_Languages/C%2B%2B/Code/Statements/Flow_Control#while_.28Preconditional_loop.29">wikipedia: while loops</a></p>
<p><a href="http://en.wikibooks.org/wiki/C%2B%2B_Programming/Programming_Languages/C%2B%2B/Code/Statements/Flow_Control#for_.28Preconditional_and_counter-controlled_loop.29">wikipedia: For loops</a></p>
<h3 id="Main-function:-entry-point-of-any-program.">Main function: entry point of any program.<a class="anchor-link" href="#Main-function:-entry-point-of-any-program.">¶</a></h3>
<span style="color:red;font-size:150%">std::cout</span> << "wanna have fun a " << a << " times" << std::endl;
<h1 id="Numbers">Numbers<a class="anchor-link" href="#Numbers">¶</a></h1><h2 id="Integer-numbers">Integer numbers<a class="anchor-link" href="#Integer-numbers">¶</a></h2><p>Integers are numbers stored with a fixed number of bits</p>
<ul>
<li>char or unsigned char: 8bits (1 Byte) $[-128,127]$ or $[0,255]$</li>
<li>short or unsigned short: 16bits (2 Bytes) $[-2^{15},2^{15}-1]$ or $[0,2^{16}-1 = 65535]$</li>
<li>integer or unsigned int: 32bits (4 Bytes) $[-2^{31},2^{31}-1]$ or $[0,2^{32}-1 = 4294967295]$</li>
<h2 id="Floating-point-numbers">Floating point numbers<a class="anchor-link" href="#Floating-point-numbers">¶</a></h2><p>Any floating point number in a computer are stored with the representation:
$$(-1)^s \times c \times b^q$$</p>
<ul>
<li>$(-1)^s$ is the sign ($s$ is its encoding)</li>
<p><a href="http://en.wikipedia.org/wiki/Floating-point#IEEE_754:_floating_point_in_modern_computers">wikipedia: floating point in modern computers</a></p>