Interested in the implementation of the search file by extension. For example, I indicated the path to the desktop and then, using the function, I output a list of all *.txt documents that he found.

    1 answer 1

    Judging by the mention of the desktop, you are under Windows. Then through FindFirstFile("C:\\Some\\Folder\\*.txt", ...); Well, FindNextFile() and FindClose() , of course.

    Link to an example in the description FindFirstFile on MSDN is available

    • one
      Well, the desktop and in Linux can be. - αλεχολυτ
    • @alexolut not in everyone, oh not in every ... - Vladimir Martyanov
    • Thank you, I’ll go to this point in the evening and try to implement it.) Yes, under Windows) forgot to mention) I’ll know for the future - goga
    • @goga there is nothing to try, the approach is 100% working. - Vladimir Martyanov
    • Well, I already did something similar, but I manually had all ifstream Loading (s) and in s there was a path to the file (for reading tht on the specified path) and with the record it was the same - goga