Click here to Skip to main content
15,892,674 members

Comments by llllskywalker (Top 1 by date)

llllskywalker 23-Feb-16 19:00pm View    
Those solutions will work if you input folder path is ASCII. They will fail if your GUI used a unicode-compatible edit box and let the user choose a path. The user might enter characters beyond the typical ASCII set. For example: "C:\A\Ŝ\C\D\" would crash since Ŝ is 015c, which contains 5c (the backward slash)! To avoid this, you need to use a library like "UTF-8 CPP", "ICU", etc to skip to the next forward-slash instead of doing it byte-by-byte.