Answer the question
In order to leave comments, you need to log in
Why does the "empty is not a member of std::locale" error occur?
Hello
std::wifstream wif("C:\\cpp\\permission.txt", std::ios::binary);
if (wif.is_open())
{
static std::locale empty ();
wif.imbue(std::locale(std::locale::empty(), new std::codecvt_utf8<wchar_t,0x10ffff, std::consume_header>));
std::wstring wline;
while (std::getline(wif, wline))
{
LPCWSTR wline = wline;
MessageBoxW(FindWindowW(NULL, L"Корзина"), NULL, wline, MB_YESNO);
}
wif.close();
}
Answer the question
In order to leave comments, you need to log in
std::locale::empty()
Compiler gives error "empty is not a member of std::locale"
empty is indeed not a member of std::locale. I suspect that you meant to write
orstatic std::locale empty; wif.imbue(std::locale(empty, new std::codecvt_utf8<wchar_t,0x10ffff, std::consume_header>));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question