title: Can't access a map member from a pointer
body: <p>That's my first question :)</p>
  
  <p>I'm storing the configuration of my program in a <code>Group-&gt;Key-&gt;Value</code> form, like the old INIs. I'm storing the information in a pair of structures.</p>
  
  <p>First one, I'm using a <code>std::map</code> with string+ptr for the groups info (the group name in the string key). The second <code>std::map</code> value is a pointer to the sencond structure, a <code>std::list</code> of <code>std::map</code>s, with the finish <code>Key-&gt;Value</code> pairs.</p>
  
  <p>The Key->Value pairs structure is created dynamically, so the config structure is:</p>
  
  <pre><code>std::map&lt; std::string , std::list&lt; std::map&lt;std::string,std::string&gt; &gt;* &gt; lv1;
  </code></pre>
  
  <p>Well, I'm trying to implement two methods to check the existence of data in the internal config. The first one, check the existence of a group in the structure:</p>
  
  <pre><code>bool isConfigLv1(std::string);
  bool ConfigManager::isConfigLv1(std::string s) {
      return !(lv1.find(s)==lv1.end());
  }
  </code></pre>
  
  <p>The second method, is making me crazy... It check the existence for a key inside a group.</p>
  
  <pre><code>bool isConfigLv2(std::string,std::string);
  bool ConfigManager::isConfigLv2(std::string s,std::string d) {
      if(!isConfigLv1(s))
          return false;
      std::map&lt; std::string , std::list&lt; std::map&lt;std::string,std::string&gt; &gt;* &gt;::iterator it;
      std::list&lt; std::map&lt;std::string,std::string&gt; &gt;* keyValue;
      std::list&lt; std::map&lt;std::string,std::string&gt; &gt;::iterator keyValueIt;
      it = lv1.find(s);
      keyValue = (*it).second;
      for ( keyValueIt = keyValue-&gt;begin() ; keyValueIt != keyValue-&gt;end() ; keyValueIt++ )
          if(!((*keyValueIt).second.find(d)==(*keyValueIt).second.end()))
              return true;
      return false;
  }
  </code></pre>
  
  <p>I don't understand what is wrong. The compiler says:</p>
  
  <pre><code>ConfigManager.cpp||In member function ‘bool ConfigManager::isConfigLv2(std::string, std::string)’:|
  ConfigManager.cpp|(line over return true)|error: ‘class std::map&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::less&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::allocator&lt;std::pair&lt;const std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;’ has no member named ‘second’|
  </code></pre>
  
  <p>But it has to have the second member, because it's a map iterator...</p>
  
  <p>Any suggestion about what's happening?</p>
  
  <p>Sorry for my English :P, and consider I'm doing it as a exercise, I know there are a lot of cool configuration managers.</p>