I have a C console app where I need to output the absolute path to a file given a (possibly) relative path. What is the best way to do this in C in a Windows environment?
I think you are looking for _fullpath().
GetFullPathName should help you on Windows.
GetFullPathName merges the name of the current drive and directory with a specified file name to determine the full path and file name of a specified file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With