O
occhiverdi
Hi,
I would like to know which file do I need to include to get NAME_MAX? I'm
trying to read filenames of a directory but it gave me error saying that
the NAME_MAX is undefined. I've looked into the /usr/include directory and
I see that it's not defined anywhere.
#include <dirent.h>
....
struct dirent * file;
char filename[NAME_MAX + 1];
....
while ((file = readdir(queue_dir)) != NULL) {
filename = file -> d_name;
....
Thanks for help.
occhiverdi
I would like to know which file do I need to include to get NAME_MAX? I'm
trying to read filenames of a directory but it gave me error saying that
the NAME_MAX is undefined. I've looked into the /usr/include directory and
I see that it's not defined anywhere.
#include <dirent.h>
....
struct dirent * file;
char filename[NAME_MAX + 1];
....
while ((file = readdir(queue_dir)) != NULL) {
filename = file -> d_name;
....
Thanks for help.
occhiverdi