I have function that should convert char* to wchar_*. But it doesn't - I have just strange string of 3 spaces. Is that because GetWC returns pointer to not existing string?
const wchar_t *GetWC(const char *c)
{
    size_t cSize = strlen(c)+1;
    std::wstring wc( cSize, L'#');
    mbstowcs( &wc[0], c, cSize );
    return wc.c_str();
}
int _tmain(int argc, _TCHAR* argv[])
{
    char *g ="aaa";
    const wchar_t* f= GetWC(g);
    wcout<<f;
    return 0;
}
 
    