title: Eclipse Method could not be resolved in a simple program C++
body: <p>I have an issue with Eclipse Indigo complaining that methods of a class couldn't be resolved, but compiling anyway and working correctly (AFAIK).  It's a very simple program.  Here is Population.cpp:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;iostream&gt;
  #include &lt;time.h&gt;
  #include "Population.h"
  
  Population::Population() {
      // TODO Auto-generated constructor stub
  
  }
  
  Population::~Population() {
      // TODO Auto-generated destructor stub
  }
  
  void Population::initializePop(int numBits, int N) {
  
      srand((unsigned)time(0));
      for(int i=0; i&lt;N; i++) {
          x[i] = (char*) calloc(numBits, sizeof(char));
          for(int j=0; j&lt;numBits; j++) {
              if( rand() &lt; 0.5 )
                  x[i][j] = 0;
              else
                  x[i][j] = 1;
          }
      }
  
  }
  
  char** Population::getX() {
      return x;
  }
  
  void Population::printStuff() {
      std::cout &lt;&lt; "Whatever";
  }
  </code></pre>
  
  <p>Now, I build that code and everything is fine.  In another project within Eclipse, I'm calling this code like this:</p>
  
  <pre><code>#include &lt;typeinfo&gt;
  #include &lt;string.h&gt;
  #include &lt;iostream&gt;
  #include "cute.h"
  #include "ide_listener.h"
  #include "cute_runner.h"
  #include "Population.cpp"
  
  void testPopulationGeneration() {
      Population* p = new Population;
      int N = 10;
      int bits = 4;
      char** pop;
  
      ASSERTM("Population variable improperly initialized", dynamic_cast&lt;Population*&gt;(p));
  
      std::cout &lt;&lt; p-&gt;printStuff();
      std::cout &lt;&lt; "Ok...";
      p-&gt;initializePop(bits, N);
  
      pop = p-&gt;getX();
      ASSERTM("Pop not correct size.", sizeof(pop) == 10);
  }
  </code></pre>
  
  <p>As you can see I'm also running the CUTE plugin for TDD in C++.  It doesn't complain when I declare p as type Population and the first assertion passes.  I'm somewhat new to C++, but I did make sure to add the project that Population.cpp is from to the include path for the test project.</p>
  
  <p>It's not a huge deal as it's not affecting anything obvious to me, but it's still very annoying.  I don't see a situation where it should do this.</p>
  
  <p>Thanks for any help!</p>