宽字符的问题
#include <iostream>using namespace std;int main(){ //宽字符 wchar_t s[100]; double d = 5.1343435; swprintf(s, L"使用时间:%lf", d); wprintf(L"%s", s); //输出????5.1343435 cout<<endl; wcout<<s<<endl; //什么都没输出 char s2[100]; sprintf(s2, "使用时间:%lf", d); printf("%s", s2); //输出正常 cout<<endl; cout<<s2<<endl; //输出正常 return 0;}