Hey! this code was supposed to get the username of windows, and get the directory of Desktop with the stored username and write a file.
std::wstring uname;
DWORD ulen = UNLEN + 1;
uname.resize(ulen);
GetUserName(&uname[0], &ulen);
std::wcout << L"Username: " << uname << L"\n";
std::wstring filepath = L"C:/Users/" + uname + L"/Desktop" + L"/gcc.txt";
std::wcout << filepath;
std::wofstream filea(filepath);
filea << L"Hello world!";
return 0;
} ```
de printing of directory is correct, username is correct but file is not written nor created.
uh thats it..