Hi Guys,
I am new to c++ and win32.
I want to quickly write code to find all subdirectories within a given directory
and store these as a tchar array.
Can you please help me ?
Thanks a lot.
Printable View
Hi Guys,
I am new to c++ and win32.
I want to quickly write code to find all subdirectories within a given directory
and store these as a tchar array.
Can you please help me ?
Thanks a lot.
You could try the FindFirstFile and FindNextFile functions
You have a sample in this FAQ: http://www.codeguru.com/forum/showthread.php?t=312461.
Thanks a lot guys, but I need to find only the folder names and create an array of them .
I do not need to find the files inside each folder.
Then use CFileFind::IsDirectory (in case of MFC) or GetFileAttributes API) to check if the file is directory.
I found one where I have to create a CstringArray but mine is not an MFC.
I am confused what all to include.
You could use std::vector instead.