title: No matching function - ifstream open()
body: <p>This is the part of the code with an error:</p>
  
  <pre><code>std::vector&lt;int&gt; loadNumbersFromFile(std::string name)
  {
      std::vector&lt;int&gt; numbers;
  
      std::ifstream file;
      file.open(name); // the error is here
      if(!file) {
          std::cout &lt;&lt; "\nError\n\n";
          exit(EXIT_FAILURE);
      }
  
      int current;
      while(file &gt;&gt; current) {
          numbers.push_back(current);
          file.ignore(std::numeric_limits&lt;std::streamsize&gt;::max(), '\n');
      }
      return numbers;
  }
  </code></pre>
  
  <p>And well, I kind of have no idea what is going on. The whole thing compiles properly in VS. However I need to compile this with dev cpp. </p>
  
  <p>I commented out the line throwing errors in the code above. The errors are:</p>
  
  <pre><code>no matching function for call 'std::basic_ifstream&lt;char&gt;::open(std::string&amp;)
  no matching function for call 'std::basic_ofstream&lt;char&gt;::open(std::string&amp;)
  </code></pre>
  
  <hr>
  
  <p>In different parts of code I get errors like <code>numeric_limits is not a member of std</code>, or <code>max() has not been declared</code>, although they exist in <code>iostream</code> class and everything works in VS.</p>
  
  <hr>
  
  <p>Why am I getting this error?</p>