After some research on google and stackoverflow I came to the conclusion to ask this question myself:
Is there a more or less portable way to get a list of all files from a directory?
I want to support a shortcut in my application where you can give it a directory from the command line and it traverses it and its subdirectories automatically. I am free to use C and C++ but don't want to depand on any thrid-party libraries if possible.
Thanks in advance!
Edit:
Regarding the duplicate-question: I already found that one and tried it but the dirent.h wasn't working for me. That's why I wrote this. Also regarding C/C++: my application is currently written in pure C and I would favor a C-only solution but if a better C++ solution is suggested it would also be acceptable.