title: A value of type "const <Component> *" cannot be assigned to an entity of type "<Component> *"
body: <p>I have a header file in C++ with a namespace and a class in it:</p>
  <pre><code>namespace imaging
  {
      class Image
      {
      protected:
          Component *buffer; // To index individual channels
          Image(unsigned int width, unsigned int height, const Component *data_ptr, bool interleaved=false); // Holds the image data
      }
  }
  </code></pre>
  <p>When I try to implement the constructor, I get an error: <code>a value of type &quot;const &lt;Component&gt; *&quot; cannot be assigned to an entity of type &quot;&lt;Component&gt; *&quot;</code>:</p>
  <pre><code>#include Image.h
  namespace imaging 
  {
      Image::Image(unsigned int width, unsigned int height, const Component *data_ptr, bool interleaved=false)
      {
          this-&gt;height = height;
          this-&gt;width = width;
          buffer = data_ptr; // The error is here!
      }
  }
  </code></pre>