code equivalent ot MSDOS/WINDOWS tree command

Can anybody help me in writing a c/c++ code which is equivalent to MSDOS tree command?
i really need help here.

Comments

  • : Can anybody help me in writing a c/c++ code which is equivalent to MSDOS tree command?
    : i really need help here.
    :
    :

    all it does is iterate through hard drive and generate a linked list of all the directories. Start with FindFirstFile(), and FindNextFile(). When a directory is encountered, make a recursive call to your function to process all the files in that directory.

    There is probably a more useful std tree container than the vector in the example below.
    [code]
    void FindTree(std::vector the List, std::string path)
    {
    ...
    ...
    if current file is a directory then call FindTree() again with
    current path + this filename
    ...

    }
    [/code]

  • Hi. I a a student on a technological institute of Serres Greece and i have as project to simulate the ms dos tree command on a c programm. Could you please give me a full code example to study cause i read the example here and i wasn't able to write the code. thanks
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories