You are here:

C++/Automatic directory list

Advertisement


Question
Hi
    I am making a C++ Program which will automatically detect
    directories of any drive including sub directories and finally     

    displaying to user path of every directory can be stored in a      

    string or array of char.
     I use Searchpath()  findfirst() and findnext() but these dont     

     help me alot
     Can u tell me some C++ library functions for doing so.
     Thankyou very much.

   I am using Turbo C-3 and
    Borland 5.02 C++ Compiler

   Ahmed Shakeel
ahmedshakeel_7@yahoo.com

Answer
Hello,

The following Windows functions should be useful to you:

GetLogicalDrives()
SetCurrentDirectory()
GetCurrentDirectory()
CreateDirectory()

Those should allow you to traverse directories all you want.

I hope this information was helpful.

- Eddie

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Eddie

Expertise

I can answer questions about the C++ language, object oriented design and architecture. I am knowledgable in a lot of the math that goes into programming, and am certified by ExpertRating.com. I also know a good deal about graphics via OpenGL, and GUIs.

Experience

I have completed numerous games and demos created with the C++ programming language. Currently employed as a software engineer in the modeling and simulation field. I have about 7 years experience.

©2016 About.com. All rights reserved.