title: Code including <fstream> does not compile
body: <p>I found the following bit of code on here and was trying to compile it in order to learn some programming:</p>
  
  <pre><code>#include &lt;fstream&gt;
  #include &lt;cerrno&gt;
  #include &lt;stdexcept&gt;
  #include &lt;cstring&gt;
  #include &lt;vector&gt;
  
  
  int main() {
      // Which disk?
      char diskName[] = "/dev/sda";
      std::string diskError = std::string() + diskName + ": ";
  
      // Open device file
      std::ifstream disk(diskName, std::ios_base::binary);
  
      if(!disk)
          throw(std::runtime_error(diskError + std::strerror(errno)));
  
      // Seek to 54321'th sector
      disk.seekg(512 * 54321);
      if(!disk)
          throw(std::runtime_error(diskError + std::strerror(errno)));
  
      // Read in one sector
      std::vector&lt;char&gt; buffer(512);
      disk.read(&amp;buffer[0], 512);
      if(!disk)
          throw(std::runtime_error(diskError + std::strerror(errno)));
  }
  </code></pre>
  
  <p>The compiler is complaining on the line that reads:</p>
  
  <pre><code>#include &lt;fstream&gt;
  </code></pre>
  
  <p>The error message is:</p>
  
  <p>'fstream' file not found</p>
  
  <p>Is there some library I need to download?</p>