Turbo C++ list files within a directory

Hi, I recently started coding in C++ and thought that writing code in old software would be a good place to start, and no need to tell me to stop using it because I'm also working in Visual Studios simultaneously. I just want to make a simple program where you set a string value to a directory where then a function starts listing every files within that directory. I know this is a bit of a lot to ask for but I've been searching everywhere on the internet to know how to list files in turbo C++.
Look in dir.h.

Checkout functions findfirst/findnext/findclose.
Unfortunately, TCC is so old that VS versions newer than 4.0 won't support the old <dir.h> headers, IIRC. IDK if you can find a lib online to replicate the functionality, but you are just as well off doing it with the Windows API. Umm... here:
http://stackoverflow.com/questions/883594/microsoft-visual-studio-opendir-and-readdir-how

Also, re old software: you're using ancient software. There really is no good reason to dink with it unless you are required to maintain an old piece of software written with said ancient CS for use on some ancient box. The language is pre-standard and you will not be able to keep anything more complicated than your basic "hello world" under the same code base between TCC and VS.

lt;dr: drop the ancient cruft and use modern software.

Oh, also, one of these ought to help.
https://www.google.com/search?q=borland+c%2B%2B+4+programmer%27s+manual+pdf

Good luck!
Topic archived. No new replies allowed.