Read newer files first from a directory - C++
<p>Lets say I have a directory which has the files with the following names:</p>

<p>00
01
02
03
04
05
...</p>

<p>The higher the number, the newer the file. I want to read say the 2 newest files but in descending order. So I want to read the 05 file first, then 04 file.</p>

<p>How can I achieve this efficiently? This directory can have 100's of files. </p>

<p>I know there is a readdir function in C++ but it reads the files in ascending order (First 00, then 01 and so on).</p>

<p>Thank you very much! :)</p>
