Solved

Directory list

Posted on 2002-05-24
2
188 Views
Last Modified: 2010-04-02
How can I get a list of files (and directorys) in a directory using standard C library functions? (Not Windows API functions)
Thanks,
Octi
0
Comment
Question by:octi
  • 2
2 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 7032442
You can't do it using standard C library, because it's not part of the C/C++ standard.

You have to use OS specific or compiler specific functions.

The _findfile function is available in most compilers/OS.
0
 
LVL 30

Accepted Solution

by:
Axter earned 50 total points
ID: 7032461
Correction:

The _findfirst/_findnext functions are available in most compilers/OS.

Another set of commonly used functions are the opendir & readdir set.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question