[c++ question] winAPI
by FiveSix - November 24, 2021 at 06:46 PM
did some looking into winAPI to find a way to make a c++ program get a list of directorys and sub-directorys and store them for later use. i stumbled across std::filesystem and was looking around and found recursive-directory-iteration. i was wondering if anyone could help me understand how to make something like this and how it works. thank you in advance!


note (im not asking you to bend me over and write the shit for me i just need a few pointers and someone who can explain it better than some half witted retard on youtube)
Quite simple actually.
You could try this

#include <dirent.h>
#include <stdio.h>

int main()
const char* PATH = ".";

DIR *dir = opendir(PATH);

struct dirent *entry = readdir(dir);

while (entry != NULL)
if (entry->d_type == DT_DIR)
printf("%s\n", entry->d_name);

entry = readdir(dir);


return 0;
you got the answer on codeproject.com bro

Possibly Related Threads…
Thread Author Replies Views Last Post
Python course question lambite 1 649 November 10, 2019 at 11:52 PM
Last Post: aiwl01
Question sunfishtooth 1 736 July 23, 2019 at 09:35 AM
Last Post: tananana

 Users browsing this thread: 1 Guest(s)