title: Redefinition error at compile time
body: <p>I've been searching through other forums and questions but I can't seem to find an answer that relates to my issue. I keep getting this error that says "Redefinition of 'Shape'" in the .cpp file and it comes up for both constructors and functions.</p>
  
  <p>Shape.h</p>
  
  <pre><code>#ifndef SHAPE_H
  #define SHAPE_H
  
  #include &lt;iostream&gt;
  using namespace std;
  
  
  class Shape {
  private:
      string name;
  public:
      Shape();
      Shape(string name);
      string getName() const;
      friend ostream&amp; operator &lt;&lt; (ostream&amp; output, const Shape &amp; shape);
  };
  
  #endif // SHAPE_H
  </code></pre>
  
  <p>Shape.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Shape.h"
  using namespace std;
  
  Shape::Shape() {
      this-&gt;name = "Shape";
  }
  
  Shape::Shape(string name) {
      this-&gt;name = name;
  }
  
  string Shape::getName() const {
      return name;
  }
  
  ostream&amp; operator &lt;&lt; (ostream&amp; output, const Shape &amp; shape) {
      output &lt;&lt; shape.getName();
      return output;
  }
  </code></pre>