, sizeof . , , WCHAR*. , sizeof (WCHAR *) 4. , WCHAR foo[23], sizeof(foo), WCHAR[23], , sizeof(WCHAR) * 23. WCHAR* WCHAR[23] , , new WCHAR[23] WCHAR[23], WCHAR*, .
Like corellary, since it sizeof(new WCHAR[23])is 4 on your platform, you are obviously dealing with an architecture where the pointer has 4 bytes. If you built it on the x64 platform, you will find that it sizeof(new WCHAR[23])returns 8.
source
share