title: CvLoadImage function and lists
body: <p>I am using CvLoadImage (in C programming language).</p>
  
  <p>Instead of passing the path or the name of my, let's say, <code>.jpg</code> file as the argument of the function, can I use a list (dynamic structure) which has every path of every <code>.jpg</code> image I want to open?</p>
  
  <p>For example, I have thought the code to be like this:</p>
  
  <p><code>CvLoadImage(list-&gt;name)</code></p>
  
  <p>having a list declared with all the paths of the names.</p>
  
  <p>instead of being like this: <code>CvLoadImage("name.jpg")</code></p>
  
  <p>In every manual I read, it just specified the function receives the name or the path of <strong>one</strong> image, but I want to recursively open one image after the other with those paths coming from a list, and I don't know how to do it.</p>
  
  <p>This is what I could do (some things are in spanish, because we speak spanish, and some other things are mixed with files)</p>
  
  <pre><code>struct fotos
  {
    char nom[30];
    struct fotos *sig;
  };
  //....
  struct fotos *lini;
  //....
  
  while(lini-&gt;sig!=0)
    {
      image=cvLoadImage(lini-&gt;nom,1);
      cvNamedWindow("ejemplo", 0);
      cvMoveWindow("ejemplo", 100, 100);
      cvShowImage("ejemplo", image);
      cvWaitKey(0);
      lini=lini-&gt;sig;
    }
    image=cvLoadImage(lini-&gt;nom,1);
    cvNamedWindow("ejemplo", 0);
    cvMoveWindow("ejemplo", 100, 100);
    cvShowImage("ejemplo", image);
    cvWaitKey(0);
    cvReleaseImage(&amp;image);
  </code></pre>
  
  <p>But it won't work either. It creates a new window, but no image is loaded.</p>