How to list all the files and folders from a directory, like a File Explorer with C/C++

preview_player
Показать описание
Hello, Everyone!! Today I am gonna show you, how to list all the files and folders from a directory, like a File Explorer using C/C++ || And you can also differentiate between Files And Folder!! #Files #Explorer #Folders
*******************************************
Source Code : -
*******************************************
Also Find Me On : -
*******************************************
Download my game from PLAY STORE : -
Name - Pixelated Flight
Рекомендации по теме
Комментарии
Автор

i am getting an error at "if(dr != NULL)" ; expected a declaration.
and at "dr=opendir(path c_str());" ; no storage class or type specifier

theawesome-est
Автор

<dirent.h> is not working on VS 2022 and stack overflow says it's no longer supported. ??? any solution

senurasenaratne
Автор

i need to read a specific folder, is that possible?

-pamarthidhanyateja
Автор

Whenever I try to specify a directoy 'string path = "C:/Code/QuickTest/gfx";' stat(type.c_str(), &dst) equals -1 how do I fix this?

timothy