I'm looking for a function that gives me the absolute file path of the file calling that function. For example if main.cpp calls this method, then the absolute path should end with "main.cpp"
I've done a bit of research and these functions are not what I'm looking for
GetCurrentDir()
GetCurrentDirectory()
Provides absolute path to working directory, which is my /project/ directory.
There is nothing in C++ for this. You are asking for reflective capabilities found only in higher level languages like Java and .net. C++ doesn't provide this feature.
The best you can do is log and use the macro __FILE__.