Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在试验,wchar_t我试图将一个数组复制到另一个数组中。这是我的代码:
wchar_t
wchar_t name[]=L"Aayman Khalid"; wchar_t Name[50]=L""; wcscpy_s(Name,sizeof(name),name); printf_s( "Name = %s\n", Name );
但是,当我运行此代码时,我得到第一个字母 ie A。有人可以向我解释为什么会这样吗?另外我怎么能复制全名?
A
printf_s与说明符一起使用"%ls"。
printf_s
"%ls"