title: Error C2143 (missing ; before namespace) in MS VC include
body: <p>I am extremely confused why I am getting this strange error all the sudden:</p>
  
  <p>Time.h is a very simple class, and it has a semicolon at the end of the class description, so I am pretty sure my code is correct here.. Then I get the same errors in: Microsoft Visual Studio 10.0\VC\include\memory.. Any ideas!?!? Thanks!</p>
  
  <p>Compiler Output</p>
  
  <pre><code>1&gt;ClCompile:
  1&gt;  Stop.cpp
  1&gt;c:\projectnextbus\Time.h(17): error C2143: syntax error : missing ';' before 'using'
  1&gt;c:\projectnextbus\Time.h(17): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  1&gt;  NextBusDriver.cpp
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\memory(16): error C2143: syntax error : missing ';' before 'namespace'
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\memory(16): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  </code></pre>
  
  <p>Update:
  Can't really post all the code as this is for a school project and we aren't supposed to post before we submit, but small snippets should be ok..</p>
  
  <p>Time.h</p>
  
  <pre><code>#ifndef TIME_HPP
  #define TIME_HPP
  
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  
  using namespace std;
  
  class Time {
  // Defines a time in a 24 hour clock
  
  public:
      // Time constructor
      Time(int hours = 0 , int minutes= 0);
  
      // POST: Set hours int
      void setHours(int h);
  
      // POST: Set minutes int
      void setMinutes(int m);
  
      // POST: Returns hours int
      int getHours();
  
      // POST: Returns minutes int
      int getMinutes();
  
      // POST: Returns human readable string describing the time
      // This method can be overridden in inheriting classes, so should be virtual so pointers will work as desired
      string toString();
  
  private: 
      string intToString(int num);
      // POST: Converts int to string type
  
      int hours_;
      int minutes_;
  
  };
  
  #endif
  </code></pre>
  
  <p>DepartureTime.h (inherited class)</p>
  
  <pre><code>#ifndef DEPARTURE_TIME_HPP
  #define DEPARTURE_TIME_HPP
  
  #include &lt;string&gt;
  #include "Time.h"
  
  using namespace std;
  
  class DepartureTime: public Time {
  public:
      // Departure Time constructor
      DepartureTime(string headsign, int hours=0, int minutes=0) : Time(hours, minutes), headsign_(headsign) { }
  
      // POST: Returns bus headsign
      string getHeadsign();
  
      // POST: Sets the bus headsign
      void setHeadsign(string headsign);
  
      // POST: Returns human readable string describing the departure
      string toString();
  
  private:
      // Class variables
      string headsign_;
  };
  #endif
  </code></pre>