title: C++ vector equivalent in C
body: <p>I have a code (C++) that looks like this</p>
  
  <pre><code>vector&lt;int&gt; values[10000];
  
  int i, j; 
  while (.....) {
      scanf("%d%d", &amp;i, &amp;j);
      values[i].push_back(j);
      values[j].push_back(i);
  }
  </code></pre>
  
  <p>but I want to rewrite this code to C. How can I do this?</p>
  
  <p>I researched the opportunity to make the own stack, but maybe have more lightweight way to rewrite this code, maybe  two-dimensional arrays. So far I can not think how this remake, I hope that someone more experienced tell me how to do it :)</p>
  
  <p>Sorry guys, added a more advanced example...</p>