title: Unknown class? C2143 syntax error: missing ";" before '*'
body: <p>I get the error "C2143: syntax error: missing ';' before '*' in Track.h
  I believe this is due to a "missing" class definition.</p>
  
  <p>These are the 3 header files:</p>
  
  <p>Topics.h, the package-level header file, which #includes everything else:</p>
  
  <pre><code>#ifndef Topics_H
  #define Topics_H
  
  #include &lt;oxf\oxf.h&gt;
  #include "Request.h"
  #include "TDPoint.h"
  #include "Track.h"
  #include "TrackReport.h"
  
  #endif
  </code></pre>
  
  <p>Then there's TDPoint (as in "3DPoint"), which simply defines a class with 3 long attributes:</p>
  
  <pre><code>#ifndef TDPoint_H
  #define TDPoint_H
  
  #include &lt;oxf\oxf.h&gt; // Just IBM Rational Rhapsody's Framework
  #include "Topics.h"
  
  class TDPoint {
      ////    Constructors and destructors    ////
  
  public :
  
      TDPoint();
  
      ~TDPoint();
  
      ////    Additional operations    ////
  
  long getX() const;    
  void setX(long p_x);
  long getY() const;    
  void setY(long p_y);    
  long getZ() const;
  void setZ(long p_z);
  
      ////    Attributes    ////
  
  protected :
  
      long x;    
      long y;    
      long z;};
  
  #endif
  </code></pre>
  
  <p>But the problem lies here, in the marked line:</p>
  
  <pre><code>#ifndef Track_H
  #define Track_H
  
  #include &lt;oxf\oxf.h&gt; // Just IBM Rational Rhapsody's Framework
  #include "Topics.h"
  #include "TDPoint.h"
  
  class Track {
  
  public :
  
      ////    Operations     ////
  
      std::string getId() const;
  
      void setId(std::string p_id);
  
      TDPoint* getPosition() const; // &lt;--- This line, the first line to use TDPoint, throws the error
  
      ////    Attributes    ////
  
  protected :
  
      std::string id;   
  
      TDPoint position;
  
  public :
  
       Track();
       ~Track();
  };
  
  #endif
  </code></pre>
  
  <p>My guess was that the compiler (MS VS2008/ MSVC9) simply didn't know the class "TDPoint." But even defining the class in the same header file as "Track", or using a forward declaration like "class TDPoint" (which then throws the error: undefined class) didn't help.
  The code was auto-generated from Rhapsody, if that makes any difference.</p>
  
  <p>But maybe the error is something else entirely?</p>