I have a C console application where I need to output the absolute path to the file taking into account the (possibly) relative path. What is the best way to do this in C on a Windows environment?
I think you are looking for _ fullpath () .
GetFullPathName should help you on Windows.
GetFullPathName combines the name of the current drive and directory with the specified file name to determine the full path and file name of the specified file.
Source: https://habr.com/ru/post/902918/More articles:Java console error under windows - javaIs there any difference between directly assigning a final variable and assigning a final variable in the constructor? - javaOpenCV and Computer Vision, where are we standing now? - opencvHow to access default images for Android (for example, thumbnail image spacebar when pressed) from java code? - androidWhat loadsHTMLString: baseURL: - iphoneApplication uses value of wrong type for current operation in classic asp - asp-classicDeserialize Inherited class with DataContractSerializer (typeof (BaseClass)) - c #https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/902921/getting-absolute-path-from-relative-in-vista-seems-to-fail-using-win32shell-pathcombine&usg=ALkJrhiS9DtWfEd1WtOONdOVclGSyTbJTgClojure and noir for classic web application - clojureHow to register multiple threads in different log files? - javaAll Articles