title: How to read files in sequence from a directory in OpenCV?
body: <p>I am new to <a href="http://en.wikipedia.org/wiki/OpenCV" rel="noreferrer">OpenCV</a>. I want to read XML files in a directory. I am using FindFirstFile, but I am not getting how can I get file names to give as input to cvLoad further. Here is the code I am using:</p>
  
  <pre><code>HANDLE hFind;
  WIN32_FIND_DATA FindFileData;
  wchar_t* file = L"D:\\zainb_s\\M.phil\\thesis\\dataset\\dataset_3\\RGB_3\\RGB\\s01_e01-   Copy\\1_walking\\depth\\*.xml";
  hFind = FindFirstFile(file, &amp;FindFileData);
  cout &lt;&lt; FindFileData.cFileName[0];
  FindClose(hFind);
  </code></pre>
  
  <p>I want to have filenames in an array to read files further to process.</p>