首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

请高手们看看int 转wchar_t书组的swprintf的有关问题

2012-03-13 
请高手们看看int 转wchar_t书组的swprintf的问题doublenIn123wchar_twchar[10]{0}intlenswprintf(wch

请高手们看看int 转wchar_t书组的swprintf的问题
double   nIn=123;

wchar_t   wchar[10]={0};

int   len=swprintf(wchar,10,L "%s ",nIn);

cout < <nIn < <endl;
                  wcout < <wchar < <endl;
//wstring   wstr=wchar;

//wcout < <wstr < <endl;
cout < <len < <endl;

请大家看看有什么问题,我的为   wcout < <wchar < <endl;
输出式null,请大家帮帮
谢谢


[解决办法]
double int这个是什么类型啊.
double nIn=123.0;
int len=swprintf(wchar,10,L "%f ",nIn);
cout < <nIn < <endl;
wcout < <wchar < <endl;

热点排行