문제

I am trying to this:

wchar_t buff[PATH_MAX];
wgetcwd( buff, PATH_MAX);

I have also tried _wgetcwd. Google suggests _wgetcwd is in dir.h, but i have never heard of such a header file.

I'm using GCC 4.3.

Thank you.

도움이 되었습니까?

해결책

If this is a Unix/Linux system there is no point in looking for a wchar_t version of getcwd. That is because all file names and directory names are just bytes with the exception of the '/' and '\0' characters. You can use UTF-8 encoding with them but the filesystem itself does not care.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top