title: Globbing in C++/C, on Windows
body: <p>Is there a <em>smooth</em> way to glob in C or C++ in Windows?</p>
  
  <p>E.g., myprogram.exe *.txt sends my program an ARGV list that has...ARGV[1]=<code>*.txt</code> in it.</p>
  
  <p>I would like to be able to have a function (let's call it readglob) that takes a string and returns a vector of strings, each containing a filename.</p>
  
  <p>This way, if I have files <code>a.txt b.txt c.txt</code> in my directory and readglob gets an argument <code>*.txt</code>, it returns the above filelist.</p>
  
  <pre><code>//Prototype of this hypothetical function.
  vector&lt;string&gt; readglob(string);
  </code></pre>
  
  <p>Does such exist?</p>