How do I resolve a relative path to an absolute path in C?

c, filepath, windows

Solution

I think you are looking for _fullpath().

Problem

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?

Original source