title: how to use C to complete a wildcard function?
body: <p>I am a rookie on C, and now I want to use C to complete a wildcard function. For example, I write a photo processing program named <strong>myphoto</strong>, and I want to use it like this: <strong>myphoto ./photos/*.png</strong>, and then myphoto will process all the png file in the dir one by one.</p>
  
  <p>I would like to solve this problem as easily as possible, without the usage of regular expression, and I came up with a idea that maybe I could use the <strong>EXEC</strong> function to execute a command, but the <strong>EXEC</strong> function only returns int, not the char*.</p>
  
  <p>So how can I solve this problem? thanks!</p>