Do I do it like:
wchar_t *str = L"12345";
because that doesn't seem to be working.
Do you have a decent definition of "doesn't seem to be working"?
Nothing is printed?
Something is printed?
Your disk has been reformatted?
Do you have a decent definition of "doesn't seem to be working"?
Nothing is printed?
Something is printed?
Your disk has been reformatted?
Sorry,
When using the L"str" as an argument to a function, it only gives the first character of the string (ie, 's')
Also, the following snippet prints nothing:
wprintf(L"%s\n", L"string");
Might I suggest "%ls" instead of "%s"?
Oops I found what the problem is. The function expects ucs2 and wchar_t is ucs4.
I'm about to mark this as solved, but does anybody have any idea how to get around this (give the function what it wants)?
Now when you say "gcc", are we assuming Linux, or one of the windows ports like MinGW or DJGPP (or others?)
It's linux; ubuntu jaunty
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.