<h1id="Concept-of-interfaces-(C++)">Concept of interfaces (C++)<aclass="anchor-link"href="#Concept-of-interfaces-(C++)">¶</a></h1><ul>
<li>An interface is usually written in <em>.hh</em> files</li>
<li>It describes <strong>how to use</strong> a function</li>
<li>To be opposed with the body of a function which describes <em>how it works</em></li>
</ul>
<p><br></p>
<h3id="-Why-is-it-important-to-have-this-concept-?-"><center> Why is it important to have this concept ? </center><aclass="anchor-link"href="#-Why-is-it-important-to-have-this-concept-?-">¶</a></h3>
<h3id="-How-to-define-new-types-in-C++-?-"><center> How to define new types in C++ ? </center><aclass="anchor-link"href="#-How-to-define-new-types-in-C++-?-">¶</a></h3>
<h2id="Typedefs-or-type-aliases"><ahref="https://en.wikibooks.org/wiki/C%2B%2B_Programming/Programming_Languages/C%2B%2B/Code/Keywords/typedef">Typedefs</a> or type aliases<aclass="anchor-link"href="#Typedefs-or-type-aliases">¶</a></h2><hr>
<h2id="enum-or-enumeration-list"><ahref="http://en.wikibooks.org/wiki/C++_Programming/Programming_Languages/C++/Code/Keywords/enum">enum</a> or enumeration list<aclass="anchor-link"href="#enum-or-enumeration-list">¶</a></h2><ul>
<li>Makes a type from an enumerated list of possibilities</li>
<li>declares the <ahref="https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes#Data_members">members</a> and <ahref="https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes#Member_Functions">methods</a></li>
<h2id="this-points-to-the-current-object"><ahref="https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes#this_pointer">this</a> points to the current object<aclass="anchor-link"href="#this-points-to-the-current-object">¶</a></h2>
<h2id="Object-instanciation-and-method-call">Object instanciation and method call<aclass="anchor-link"href="#Object-instanciation-and-method-call">¶</a></h2>
<h2id="Dynamic-allocation-and-method-call">Dynamic allocation and method call<aclass="anchor-link"href="#Dynamic-allocation-and-method-call">¶</a></h2><ul>
<h2id="Polymorphism"><ahref="http://en.wikipedia.org/wiki/Subtype_polymorphism">Polymorphism</a><aclass="anchor-link"href="#Polymorphism">¶</a></h2><p>Set of mechanisms allowing program methods/functions in several ways</p>
<spanclass="n">std</span><spanclass="o">::</span><spanclass="n">cout</span><spanclass="o"><<</span><spanclass="s">"Houston we have a problem"</span><spanclass="p">;</span>
<spanclass="n">std</span><spanclass="o">::</span><spanclass="n">cerr</span><spanclass="o"><<</span><spanclass="s">"Out of Range error: "</span><spanclass="p">;</span>
<h2id="Making-your-exceptions"><ahref="https://en.cppreference.com/w/cpp/error/exception">Making your exceptions</a><aclass="anchor-link"href="#Making-your-exceptions">¶</a></h2>
<h1id="Interactive-session-on-making-first-class-usage-in-C++">Interactive session on making first class usage in C++<aclass="anchor-link"href="#Interactive-session-on-making-first-class-usage-in-C++">¶</a></h1>