title: how can to use array containing c++ map
body: <p>I have difficulty understanding this part of a code? Is it possible to get pictorial/diagram explanation.</p>
  
  <pre><code>//test.h
  typedef std::map&lt;std::string, std::string&gt; mType;
      static const m_Type::value_type data[] = {
          m_Type::value_type("A", "B"),
          m_Type::value_type("C", "D"),
          m_Type::value_type("E", "F")
      };
  //test.cc
  void test(std::map&lt;std::string, std::string&gt;::value_type data)
  {
      cout&lt;&lt;data[0].first&lt;&lt;endl;
  }
  //main.cc
  test(data);
  </code></pre>
  
  <p>In main.cc I wanted to call test() to print elements but getting error</p>
  
  <pre><code>main.cc: In function 'void test(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;)':
  main.cc:10: error: no match for 'operator[]' in 'data[0]'
  </code></pre>