title: C++ duplicate symbol linker error with proper include guards?
body: <p>I'm writing a program to test concrete inheritance, though I cannot resolve the duplicate symbol linker error Clang returns. My understanding is duplicate symbols is always the result of incorrect includes/guards. I have triple checked my includes/guards, but I cannot find any errors. Could the duplicate symbol be the result of something other than include guards? Many thanks, as I grow my programming skills I intend to contribute here frequently.</p>
  
  <p>.h</p>
  
  <pre><code>#ifndef POINTARRAY_H
  #define POINTARRAY_H
  #include "array.h"
  
  namespace Jules
  {
      namespace Containers
      {
          class PointArray: public Array&lt;Point&gt;
          {
          public:
              PointArray();    //default constructor
              ~PointArray();    //destructor
              PointArray(const PointArray&amp; p);    //copy constructor
              PointArray(const int i);    //constructor with input argument
              PointArray&amp; operator = (const PointArray&amp; source);    //assignment operator
              double Length() const;    //length between points in array
          };
      }
  }
  #ifndef POINTARRAY_CPP
  #include "PointArray.cpp"
  #endif
  #endif
  </code></pre>
  
  <p>.cpp</p>
  
  <pre><code>#ifndef POINTARRAY_CPP
  #define POINTARRAY_CPP
  #include "PointArray.h"
  
  using namespace Jules::CAD;
  
  namespace Jules
  {
      namespace Containers
      {
          PointArray::PointArray() : Array&lt;Point&gt;()    //default constructor
          {
          }
  
          PointArray::~PointArray()    //destructor
          {
          }
  
          PointArray::PointArray(const PointArray&amp; p) : Array&lt;Point&gt;(p)    //copy constructor
          {
          }
  
          PointArray::PointArray(const int i) : Array&lt;Point&gt;(i)    //constructor with input argument
          {
          }
  
          PointArray&amp; PointArray::operator = (const PointArray&amp; source)    //assignment operator
          {
              if (this == &amp;source)
                  return *this;
              PointArray::operator = (source);
              return *this;
          }
  
          double PointArray::Length() const
          {
          double lengthOfPoints = 0;
          for (int i = 0; i &lt; Array::Size()-1; i++)
              lengthOfPoints += (*this)[i].Distance((*this)[i+1]);
              return lengthOfPoints;
          }
      }
  }
  #endif
  </code></pre>
  
  <p>Update: Thank you everyone for your help. I understand the mechanics now.</p>