Link to home
Start Free TrialLog in
Avatar of hoooi
hoooi

asked on

wcscpy question

Hi, what is wrong here?

     wchar_t tag[30];
     wcscpy(tag, "haha");

error C2664: 'wcscpy' : cannot convert parameter 2 from 'char [5]' to 'const unsigned short *'

How to fix it? I need to use
wcsstr(line, tag) later on.


Thanks.
Avatar of jhance
jhance

wcscpy(tag, L"haha");
ASKER CERTIFIED SOLUTION
Avatar of jhance
jhance

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hoooi

ASKER

Awesome!!! And thanks for the explanation!
Unicode is really new to me.