cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
user name:
password:
Forgot your password?
please wait
try again
cancel
forgot your password?
sign up
log in
[Legacy version]
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
How to get full path from relative path
How to get full path from relative path
Aug 27, 2017 at 8:42pm
Aug 27, 2017 at 8:42pm UTC
randym
(1)
Does anyone know any c++ function that I can use to retrieve a full file path from a relative file path.
Aug 27, 2017 at 11:31pm
Aug 27, 2017 at 11:31pm UTC
ne555
(10692)
https://linux.die.net/man/3/getcwd
Aug 28, 2017 at 4:00am
Aug 28, 2017 at 4:00am UTC
JLBorges
(13770)
C++17 / Filesystem TS:
std::filesystem::canonical()
/
std::experimental::filesystem::canonical()
http://en.cppreference.com/w/cpp/filesystem/canonical
POSIX:
realpath()
http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html
Windows:
GetFullPathName()
https://msdn.microsoft.com/en-us/library/windows/desktop/aa364963(v=vs.85).aspx
Topic archived. No new replies allowed.