title: Reading a JSON file with jsoncpp
body: <p>I am trying to use integer values from a list in a JSON file, but I seem to be having trouble with parsing the file.</p>
  
  <p>I tried changing the line "Reader reader;" to "CharReader reader;", but that doesn't work with the parse function.</p>
  
  <pre><code>#include &lt;fstream&gt;
  #include "json\json.h"
  using namespace std;
  using namespace Json;
  
  int main()
  {
      ifstream f("settings.json");
      Reader reader; // line 11
      Value settings;
      f &gt;&gt; settings;
      reader.parse(f, settings); // line 14
      Value rxv = settings["res"][0u];
      Value ryv = settings["res"][1u];
      int screenres_x = rxv.asInt();
      int screenres_y = ryv.asInt();
  </code></pre>
  
  <p>Content of JSON:</p>
  
  <pre><code>{
      "res": [1024, 768],
      "windowed": true,
      "fpscap": true
  }
  </code></pre>
  
  <p>I expect the settings value to contain the contents of the JSON file, but I am getting the following errors:</p>
  
  <pre><code>"'Json::Reader': Use CharReader and CharReaderBuilder instead." on line 11
  
  "'Json::Reader::__autoclassinit2': Use CharReader and CharReaderBuilder instead." on line 11
  
  "'Json::Reader::Reader': Use CharReader and CharReaderBuilder instead." on line 11
  
  "'Json::Reader::parse': Use CharReader and CharReaderBuilder instead." on line 14
  </code></pre>