I need to have full path of C++ files (name of file is not neccesary). It musn't to be depended on path of execution.
I can use __FILE__
, hovewer it gives me only name of file. I was seeking in boost::filesystem, but I only found boost::filesystem::current_path()
- unfortunately it gives me path of directory from which I run program.
I looking for path of cpp file, not path of exe. I need it for other tool to generate groups of cpp files after directory of cpp files.
Any ideas?
Edit: Maybe it is possible to use bash script which gives actual directory of cpp file (not sh file)?