title: How can a C++ header file include implementation?
body: <p>Ok, not a C/C++ expert by any means, but I thought the point of a header file was to declare the functions, then the C/CPP file was to define the implementation.</p>
  
  <p>However, reviewing some C++ code tonight, I found this in a class's header file...</p>
  
  <pre><code>public:
      UInt32 GetNumberChannels() const { return _numberChannels; } // &lt;-- Huh??
  
  private:
      UInt32 _numberChannels;
  </code></pre>
  
  <p>So why is there an implementation in a header? Does it have to do with the <code>const</code> keyword? Does that inline a class method? What exactly is the benefit/point of doing it this way vs. defining the implementation in the CPP file?</p>