R
Rookie
I was just wondering whether there is any MAX_PATH macro in C\C++? If not
what is a safe value to assume for maximum path length?
what is a safe value to assume for maximum path length?
Rookie said:I was just wondering whether there is any MAX_PATH macro in C\C++? If not
what is a safe value to assume for maximum path length?
If you're asking about a constant that defines the largest value that some
file's path may have on the filesystem, then you should ask this question on
a newsgroup that discusses your platform. AFAIK, there is no macro named
MAX_PATH in standard C or C++. If you're on Windows, then Microsoft's MSDN
or Microsoft-specific newsgroups may be useful.
Jack Klein said:Nonsense, there is a perfectly valid solution, defined by standard C
and inherited by standard C++.
Look up the macro FILENAME_MAX defined in <stdio.h> and <cstdio>.
This is a real-world problem if you ask meJack Klein said:Nonsense, there is a perfectly valid solution, defined by standard C
and inherited by standard C++.
Look up the macro FILENAME_MAX defined in <stdio.h> and <cstdio>.
Rookie said:I am working on a UNIX platform. I had a vague idea of some MAX_PATH (or
MAXPATH) macro in Windows. But I justed wanted to know how I would do it in
UNIX. But I guess the FILENAME_MAX macro is platform independent and works
well enough. Anyways thanks to both of you guys for your replies!
Nonsense, there is a perfectly valid solution, defined by standard C
and inherited by standard C++.
Look up the macro FILENAME_MAX defined in <stdio.h> and <cstdio>.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.