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?
Thank you RedX and Kaz for your answers. I don’t get why by me it gives the path of the exe. I found an other way to do it :
It is less elegant than a single line… but it works for me.