title: Header Multiple Redefinition
body: <p>I understand that this question has been asked to death, but I've done a decent amount of research and nothing has helped so far. Yes I have lots and lots of header guards No as far as I know nothing needs inline every function is within a class. I have a encoderrunner.cpp that includes encoder.h and decoder.h both encoder.h and decoder.h include FrequencyTable.h and that's where all hell breaks loose, the compiler says that everything within FrequencyTable is a redefinition. this is one of many this just happens to be from the class i separated from FrequencyTable</p>
  
  <pre><code>/home/sersay/Documents/ECS60/p4/FrequencyNode.cpp:10: multiple definition of `FrequencyNode::FrequencyNode(unsigned char, FrequencyNode*, FrequencyNode*)'
  decoder.o:/home/sersay/Documents/ECS60/p4/FrequencyNode.cpp:10: first defined here
  </code></pre>
  
  <p>etc...</p>
  
  <ul>
  <li>I've had/added header guards including trying #pragma once</li>
  <li>FrequencyTable was originally a nested class so I tried separating it into two classes, still same error</li>
  <li>I do have functions outside classes but they don't exist in my FrequencyTable class or the other class i separated from it</li>
  </ul>
  
  <p>I can provide more code but I don't believe its entirely relevant, perhaps it is how i'm compiling it?</p>
  
  <pre><code>encoder.out : decoder.o encoder.o encoderRunner.o  
  g++ -ansi -Wall -g -o encoder.out decoder.o encoder.o encoderRunner.o  
  
  decoder.o : decoder.cpp decoder.h 
  g++ -ansi -Wall -g -c decoder.cpp
  
  encoder.o : encoder.cpp encoder.h 
  g++ -ansi -Wall -g -c encoder.cpp
  
  encoderRunner.o : encoderRunner.cpp CPUTimer.h encoder.h decoder.h 
  g++ -ansi -Wall -g -c encoderRunner.cpp
  
  clean : 
  rm -f encoder.out decoder.o  encoder.o  encoderRunner.o  
  </code></pre>
  
  <p>Edit1:</p>
  
  <pre><code>    #pragma once
      #ifndef FrequencyTable_H_
      #define FrequencyTable_H_
  
      #include "FrequencyNode.h"
  
      //class FrequencyNode;
  
      class FrequencyTable
      {
      private:
          FrequencyNode *HighestNode;
          FrequencyNode *LowestNode;
      public:
          FrequencyTable();
          ~FrequencyTable();
          FrequencyNode * insert(unsigned char symbol); //USE THIS for new values in hash
          unsigned char * GetOrder();
  
      };
  
  
  //#include "FrequencyTable.cpp"
  #endif
  </code></pre>
  
  <p>Edit2(Ed's Request):</p>
  
  <pre><code>#include "FrequencyTable.h"
  #include "FrequencyNode.h"
  #include &lt;iostream&gt;
  #include &lt;stdlib.h&gt;
  using namespace std;
  </code></pre>
  
  <p>please let me know what other information you need </p>