The only help I've found online so far to achieve this (storing the number of files in a given folder) is by using the Boost library. I'd rather not include anymore libraries to my current project if I don't have to.
So what other options to I have for figuring out how many files are within a folder, and storing that number in an integer data type?
@Thomas1965 I do have C++17 enabled in VS and included <experimental/filesystem> but can't seem to get PATH to be recognized, unless I'm just using it wrong
EDIT: Alright I've missed the experimental part being a namespace. So I've got
std::experimental::filesystem::path _dir;
so how would I now use this to look in a directory to count it's files?
you can ask the OS via 'system' calls using ls or dir (unix, windows) redirected to a file.
its not as clean as using OS specific libraries, but its one way to do it. Dir's final line gives the number of files summary so you can find that line and echo it.