请高手帮忙修改下这个C++程序 很急 谢谢 20

我用的是borlandc++我是新手写出来不能运行但又不知道问题出在哪能帮忙修改下可以让他运行吗谢谢#include<locale.h>#include<iostream... 我用的是borland c++ 我是新手 写出来不能运行 但又不知道问题出在哪能帮忙修改下可以让他运行吗 谢谢

#include <locale.h>
#include <iostream.h>
int main()
{ locale::global(locale("866"));
wstring str;
wcout<<L"请输入行:"<<endl;
getline(wcin,str);
int count=0;
for(wstring::const_iterator it=str.begin();it!=str.end();++it)
{
switch(*it)
{
case L'(':
++count;
break;
case L')':
--count;
break;
}
}
wcout<<L"左括号的数量 ";
if(count)
{
wcout<<L"在 "<<abs(count)<<(count>0?L" 多于":L" 小于");
wcout<<L" 右括号"; }
else wcout<<L"等于右括号的数量";
wcout<<endl;
system("PAUSE");
return 0;}
展开
 我来答
忘至白葬不情必0T
2009-03-30 · TA获得超过3万个赞
知道大有可为答主
回答量:1.1万
采纳率:90%
帮助的人:1.2亿
展开全部
#include <locale.h>
#include <iostream.h>
改成
#include <locale>
#include <iostream>
using namespace std;
试试
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式