I have been struggling with this for several days now.
I want to create functions that go through the directory, select all files with the * .csv extension and read the data in them.
I created a function that should check every file name that is legal, checking that the line ends with .csv. For this, I want to go to the end of the char * array. I tried this:
char * point = file_name;
while (point != "\0"){
point += 1;
}
which goes through the char * array without searching and "\ 0".
If i write
*point != "\0"
The compiler warns me that I am comparing and int with char.
I should note that I get the file name using
dirent->d_name
Yotam source
share