Pelles C forum

C language => Beginner questions => Topic started by: bitcoin on April 27, 2020, 05:16:03 pm

Title: Printf ws error?
Post by: bitcoin on April 27, 2020, 05:16:03 pm
Code such as
Code: [Select]
WCHAR wchCompName[256];
DWORD dwSize = 255;

if (GetComputerNameW(wchCompName, &dwSize))
printf("%ws\n", wchCompName);
print 'ws', not unicode string. Why?
Title: Re: Printf ws error?
Post by: TimoVJL on April 27, 2020, 08:02:46 pm
use %ls and read help file
Title: Re: Printf ws error?
Post by: Ricardo Bermudez on April 28, 2020, 12:44:13 am
use %ls and read help file

That was going to say