c++ - replacement for findfirst() and findnext() -
is there replacement findfirst() , findnext(). using microsoft visual c++ 2010 express , doesn't support these functions neither header file <dir.h> ?
i looking count number of files in directory using these functions having problem without these functions.
if there no replacement of mentioned functions there other way out. ? other functions ?
as 'iammilind' said in comments (probably worthy of answer) - can use windows api's findfirstfile , findnextfile functions, have fill struct , iterate through latter until reach invalid handle. these functions do work on console, must include 'windows.h' header.
these functions come couple of pitfalls however, , if want code run on other windows you're better off using header/library (such boost::filesystem, mentioned vbx).
also, may of help: c++ - load filename + count number of files in current directory + filter file extension
Comments
Post a Comment