Home Forums Programming retrieve ull path to c++ executable Reply To: retrieve ull path to c++ executable

#30653
Anonymous
Inactive

Well , time is a great heler, unless you have a bad rash, then get a cream.
And lo and behold the problem solution was found

#include <direct.h> // for getcwd

char FilePath[_MAX_PATH]; // _MAX_PATH represents the longest possible path on this OS

getcwd(FilePath, _MAX_PATH); // reads the current working directory into the array FilePath

works well for C++ in both VS6 and Bloodshed Dev c++.
post closed.