no edge is getting stored in my multigraph
<p>I am trying to make multi-weighted graphs.<br>
<strong>Input is to be made in following way</strong>  </p>

<ol>
<li>Firstly user number of vertex user want  and    </li>
<li>The ith line of a programmer's map contains details of the vertex
directly accessible from room i .  for ex</li>
</ol>

<p><strong>5</strong><br>
<strong>a 2</strong>  <em>//  (vertex 1 is connected to vertex 2 by edge having weight 'a')</em><br>
<strong>t 5 r 4</strong> <em>//  (vertex 2 is connected to vertex 4 an by edge having weight 't'and'r')</em><br>
<strong>a 4</strong><br>
<strong>r 2 t 3</strong><br>
<strong>b 5 i 5 o 5</strong> </p>

<pre><code>#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;sstream&gt;
using namespace std;
struct maps{
 vector&lt;char&gt; weight;   //for storing multiple-edge and self-loop![enter image description here][1]
};
void input_edge(int n,maps m[10][10])
{
 std::string user_input;
 std::istringstream iss(user_input);
 char letter;// for making tokens 
 int index; // for making tokens
 int i;
 for(i=1;i&lt;=n;i++)
{ std::getline(std::cin, user_input);
  while (iss &gt;&gt; letter &gt;&gt; index)
  m[i][index].weight.push_back(letter);
}
}
int main()
{ int n;//no.of vertex user want to make graph
  cin&gt;&gt;n;
  cin.ignore(1000,'\n');
  maps m1[10][10];
  input_edge(n,m1);
  int i,j; 
  for(i=1;i&lt;=n;i++)
  for(j=1;j&lt;=n;j++)
  {cout&lt;&lt;"no of edge between vertex"&lt;&lt;i&lt;&lt;' '&lt;&lt;"and"&lt;&lt;' '&lt;&lt;j&lt;&lt;':'&lt;&lt;m1[i][j].weight.size()&lt;&lt;endl;}//to find no of edge between 2 vertex
} 
</code></pre>

<p>but i am getting incorrect outputs.please tell how to fix it..  </p>

<blockquote>
  <p>[1]: <a href="http://i.stack.imgur.com/sTgeD.png" rel="nofollow">http://i.stack.imgur.com/sTgeD.png</a></p>
</blockquote>
