J
Julius Mong
Hi all, I'm doing this:
// Test char code
wchar_t lookup[] = {0x8364, 0x5543, 0x3432, 0xabcd, 0xef01};
for (int x=0; x<5; x++) {
wchar_t * string = (wchar_t*) malloc(sizeof(wchar_t));
string = (wchar_t*)lookup[1];
string[sizeof(wchar_t)] = '\0';
CComBSTR bstrTest = SysAllocString(string);
}
And the line string=lookup[...] gives me this error:
error C2440: '=' : cannot convert from 'unsigned short' to 'unsigned
short *'
Can someone tell me what I'm missing? I've tried casting it to (wchar_t*)
and it'd crash as expected... I'm stuck...
Thanks, Jules
// Test char code
wchar_t lookup[] = {0x8364, 0x5543, 0x3432, 0xabcd, 0xef01};
for (int x=0; x<5; x++) {
wchar_t * string = (wchar_t*) malloc(sizeof(wchar_t));
string = (wchar_t*)lookup[1];
string[sizeof(wchar_t)] = '\0';
CComBSTR bstrTest = SysAllocString(string);
}
And the line string=lookup[...] gives me this error:
error C2440: '=' : cannot convert from 'unsigned short' to 'unsigned
short *'
Can someone tell me what I'm missing? I've tried casting it to (wchar_t*)
and it'd crash as expected... I'm stuck...
Thanks, Jules