Name
FILENAME_MAX macro — Maximum length of a filename
Synopsis
int FILENAME_MAX
FILENAME_MAX
is the size
you should use when declaring a character array that will store a
filename. Some systems do not have a fixed maximum size for a
filename, in which case FILENAME_MAX
is a recommended size, and
the resulting character array might not be large enough to hold all
valid filenames. The FILENAME_MAX
macro expands to a constant integer.
Note
Use std::string
instead
of a character array to avoid any problems with character arrays
that are too small.
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.