I want to get file extensions without using standart libraries in C. so basically i want to search for .txt
files in a folder which includes .png
, .txt
, .jpg
files.
I don't have a certain code to show, although while I was searching I found a code which includes <dirent.h>
and everybody was saying this code cannot be done without that library. Can't I do it without that? and also in some websites they were saying <dirent.h>
is only a library for Linux. I'm using MacOS.
code was this: How can I get only txt files from directory in c? error is this:
Member reference base type 'char [1024]' is not a structure or union.
Can you help me?