title: Multiple Definition Error in Compiler C++
body: <p>This is the image of my error.
  <img src="https://i.stack.imgur.com/yx57R.png" alt="This is the image of my error."></p>
  
  <p><a href="https://gist.github.com/anonymous/b8bab69373b011254675" rel="nofollow noreferrer">This</a> is my header/cpp file.</p>
  
  <p><code>PCB.cpp</code></p>
  
  <pre><code>#include "PCB.h"
  
  
  PCB::PCB(){
      PID = 0;
      filename = " ";
      memStart = 0;
      cdrw = " ";
      filelength = 0;
  }
  
  
  PCB::PCB(int p, string fn, int m, string rw, int fl){
      PID = p;
      filename =  fn;
      memStart = m;
      cdrw = rw;
      filelength = fl;
  }
  
  void PCB::getParam(){
      cout &lt;&lt; PID &lt;&lt; " " &lt;&lt; filename &lt;&lt; "   " &lt;&lt; memStart &lt;&lt; " " &lt;&lt; cdrw &lt;&lt; " " &lt;&lt; filelength &lt;&lt; endl;
  }
  
  void PCB::setPID(int p){
      PID = p;
  }
  
  void PCB::setFile(string name){
      filename = name;
  }
  
  void PCB::setCDRW(string rw){
      cdrw = rw;
  }
  
  void PCB::setMem(int m){
      memStart = m;
  }
  
  void PCB::setLength(int l){
      filelength = l;
  }
  
  int PCB::returnPID(){
      return PID;
  }
  
  string PCB::returnFile(){
      return filename;
  }
  
  int PCB::returnMem(){
      return memStart;
  }
  
  string PCB::returnRW(){
      return cdrw;
  }
  
  int PCB::returnLength(){
      return filelength;
  }
  </code></pre>
  
  <p><code>PCB.h</code></p>
  
  <pre><code>#ifndef PCB_H
  #define PCB_H
  #include&lt;string&gt;
  #include&lt;iostream&gt;
  
  
  using namespace std;
  
  class PCB
  {
  
      private:
  
          int PID;
          string filename;
          int memStart;
          string cdrw;
          int filelength;
  
      public:
          PCB();
          PCB(int, string, int, string, int);
          //setters
          void setPID(int);
          void setFile(string);
          void setMem (int);
          void setCDRW (string);
          void setLength (int);
          //getters
          void getParam();
          int returnPID();
          string returnFile();
          int returnMem();
          string returnRW();
          int returnLength();
  
  
  };
  
  #endif // PCB_H
  </code></pre>
  
  <p>I'm getting a Multiple Definition error and I have no idea why. Is it because I'm using namespace std or is it because of something else? I normally overload my constructors. I'm really confused. </p>