I wanted to obtain the PATH of Current Working Directory
in C++
program. It should run for Windows
, Sun Solaris
, UNIX
. I found this to be my answer. But our compiler is giving error that it cannot find the file unistd.h
. I am compiling in Windows. I have used the exact same code as mentioned in the correct answer. What is the problem here?
Plus my boss is questioning the working of this code. I have commented the UNIX lines & the program is running fine in Windows. Even he does not know how this code is working. Can anybody please explain this code to me please? Thank You.