show.Format("预计运算时间为 %d seconds",y*dwEnd/1000);
提示错误 为什么 我以前这么写都没问题
现在用vc2008的问题么
1>------ 已启动生成: 项目: PengWW, 配置: Debug Win32 ------
1>正在编译...
1>PengWWlib.cpp
1>d:\code\pengww\pengww\pengwwlib.cpp(138) : error C2664: “void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)”: 不能将参数 1 从“const char [3]”转换为“const wchar_t *”
1>        with
1>        [
1>            BaseType=wchar_t,
1>            StringTraits=StrTraitMFC<wchar_t>
1>        ]
1>        与指向的类型无关;转换要求 reinterpret_cast、C 样式转换或函数样式转换

解决方案 »

  1.   

    不能将参数 1 从“const char [3]”转换为“const wchar_t *” 
    CStringA show
    或者
    用多字符集编译
      

  2.   

    或者show.Format(L"预计运算时间为 %d seconds",y*dwEnd/1000); 
      

  3.   

    show.Format(_T("预计运算时间为 %d seconds"),y*dwEnd/1000); 
      

  4.   

    VC6工程默认是多字节的,VS2008默认是Unicode的。
      

  5.   

    show.Format(L"预计运算时间为 %d seconds",y*dwEnd/1000); 
    字符集问题,很明显