title: How to get all file names in current directory?
body: <p>My goal is to build a program that renames all files in the current working directory so they don't have any spaces, any special characters or any accented characters (for example  É would become E). I'm planning on using <code>int rename(const char *oldname, const char *newname);</code> . My problem is how do I get the files in the current working directory? I would like to have the executable I'm creating put in a folder with a files with bad names and run it and the files all be renamed.</p>
  
  <p>A platform independent solution would be preferable, otherwise I'm using Windows 7 Enterprise 32bit.</p>
  
  <p>This question isn't a duplicate because I don't know the path for <code>opendir ("c:\\src\\");</code> it's whatever directory the program is being executed from.</p>