Sender: nate AT cartsys DOT com Message-ID: <369FF1B8.26B03499@cartsys.com> Date: Fri, 15 Jan 1999 17:56:08 -0800 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.0.36 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Travers the DirTree structure in ANSI C++ References: <77gtr6$ng AT bgtnsc02 DOT worldnet DOT att DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Camilo wrote: > > Hi, > > I need to know how do you travers the DirTree structure in ANSI C++? > > In Win you use: > > struct _finddata_t DirFls; > _findfirst(char *curpth, &DirFls); > _findnext( hFile, &DirFls); > _findclose(hFile); > > as I did in the attached (dirty, yet working) code example. > > I did my homework, and was wondering if ANSI C++ does not provide such > thing (either). It doesn't. But: * POSIX, generally implemented on DJGPP and Unix systems, has `opendir'/`readdir'/etc. * DOS compilers, including DJGPP, have `findfirst'/`findnext'. -- Nate Eldredge nate AT cartsys DOT com