注册 登录
编程论坛 C++教室

我的visual c++ 2010老提示LC_ALL标识符未定义!

crsx 发布于 2012-09-18 20:35, 1237 次点击
我的visual c++ 2010老提示LC_ALL标识符未定义!是怎么回事呢!
用c++ 6.0也是一样的提示!

程序代码:

#include <iostream>;
#include<locale>;
int main()
{

    setlocale(LC_All,"chs");
    wchar_t wt[]=L"";
    std::wcout<<wt;

}



 visual c++ 2010提示: error C2065: “LC_All”: 未声明的标识符
visual c++ 6.0提示:error C2065: 'LC_All' : undeclared identifier


!
!
!

[ 本帖最后由 crsx 于 2012-9-18 20:36 编辑 ]
3 回复
#2
crsx2012-09-18 22:15
问题找出来啦。。
#include 和<locale> 中间少了一个空格。。。。
#3
lwbkfc2012-09-25 12:49
LC_All(错误)  换成LC_ALL

l变成大写
#4
rjsp2012-09-25 14:10
错误一大滩呀
程序代码:
#include <iostream>
#include <locale>

int main()
{
    std::locale oldlocale = std::wcout.imbue( std::locale("chs",std::locale::ctype) );
    std::wcout << L"" << std::endl;
    std::wcout.imbue( oldlocale );

    return 0;
}

1