I'v been doing some C++ programming I have stumbled on a weird behavior, whenever I try to get current directory using GetCurrentDirectory() it gives me back only the letter of the current disk.
Here's the code :
TCHAR path[MAX_PATH + 1] = L"";
DWORD len = GetCurrentDirectory(MAX_PATH, path);
cout << (char *)path;
Here's the output :
Z
Because my project is in my Z:\ disk
I was wondering if it has to do with the buffer size but i set it to MAX_PATH and even tried to set it to 1024.