title: fatal error: string: No such file or directory compilation terminated
body: <p>I 've been struggling for more than 3 hours but cannot find a solution.
  A simple helloworld program is running nicely and I can get the output,</p>
  
  <pre><code> #include&lt;iostream&gt;
      #include&lt;string&gt;
  
      using namespace std;
      int main(){
         string s;
         cout&lt;&lt;"hello world";
      }
  </code></pre>
  
  <blockquote>
    <p>But for the My Sudoku Project I have the following user defined header
    files, SudokuSolver.h, Matrix.h, Cell.h, Pos.h, Error.h, Exception.h and
    their corresponding .cpp files.</p>
    
    <p>And <code>ExampleProgram.cpp</code> uses these header files, to solve a Sudoku.</p>
  </blockquote>
  
  <p>(All the .h and .cpp files are in a same folder.)</p>
  
  <p>I have included  <code>using namespace std;</code> and I included the string as <code>#include &lt;string&gt;</code>.
  in each header file, wherever I used string.h. But even though I am getting the <code>fatal error: string: No such file or directory compilation terminated.</code> when I run as </p>
  
  <p>g++  ExampleProgram.cpp SudokuSolver.h Cell.h Error.h Pos.h Matrix.h       </p>
  
  <p><strong>When I compile the ExampleProgram.cpp</strong> as </p>
  
  <pre><code> g++ -c ExampleProgram.cpp SudokuSolver.h
   Cell.h Error.h Pos.h Matrix.h       
  </code></pre>
  
  <p>I am getting no error.</p>
  
  <p><strong>When I run the ExampleProgram.cpp</strong> using <code>./a.out</code> I am not getting the output for my sudoku solver. Rather I am getting the output of my previously runned helloworld program. It shows my <code>ExampleProgram.cpp</code> has not successfully compiled. But as previously said </p>
  
  <pre><code>g++ -c ExampleProgram.cpp  SudokuSolver.h 
      Cell.h Error.h Pos.h Matrix.h       
  </code></pre>
  
  <p>doesn't give any error. </p>
  
  <p>This is my output:</p>
  
  <pre><code>[fosslab@fosslab SudokuSolver]$ g++ -c Error.h
  [fosslab@fosslab SudokuSolver]$ g++ -c Exception.h
  [fosslab@fosslab SudokuSolver]$ g++ -c Matrix.h
  [fosslab@fosslab SudokuSolver]$ g++ -c Cell.h
  [fosslab@fosslab SudokuSolver]$ g++ -c Pos.h
  [fosslab@fosslab SudokuSolver]$ g++ -c SudokuSolver.h
  [fosslab@fosslab SudokuSolver]$ g++ -c ExampleProgram.cpp SudokuSolver.h Excepti
  on.h Cell.h Error.h Pos.h Matrix.h                                             
  [fosslab@fosslab SudokuSolver]$ ./a.out
  hello world[fosslab@fosslab SudokuSolver]$ 
  </code></pre>