I'm writing a program in C++ using the Qt library. There is a symbolic link in my home bin directory to the executable. I would like the current working directory of my program to be the directory in which I am with my terminal (ie. the result of the pwd
command). I saw the QDir::currentPath()
function, but it gives back the directory where the binary is.
How can I find my current working directory?
See Question&Answers more detail:os