标题:求助:初学者的问题
只看楼主
lele2003
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-12-20
 问题点数:0 回复次数:2 
求助:初学者的问题

#include<iostream.h>
using namespace std;
void main()
{
int i,score;
cout<<"kaoshifenshu";
cin>>score;
i=score/10;
switch(i)
{
case 10:
case 9:
cout<<"you";
break;
case 8:
cout<<"liang";
break;
case 7:
case 6:
cout<<"zhong";
break;
default:
cout<<"cha";
}
}
我的程序有问题吗?
C:\PROJECT\输入\输入.cpp(2) : error C2871: 'std' : does not exist or is not a namespace

执行 cl.exe 时出错.

输入.obj - 1 error(s), 0 warning(s)

[此贴子已经被作者于2007-1-24 21:48:26编辑过]

搜索更多相关主题的帖子: cha default include zhong 
2007-01-24 21:43
WE11021102
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2007-1-13
得分:0 
#include<iostream>
using namespace std;

void main()
{
int i,score;
cout<<"kaoshifenshu";
cin>>score;
i=score/10;
switch(i)
{
case 10:
case 9:
cout<<"you";
break;
case 8:
cout<<"liang";
break;
case 7:
case 6:
cout<<"zhong";
break;
default:
cout<<"cha";
}
}



#include<iostream.h>
void main()
{
int i,score;
cout<<"kaoshifenshu";
cin>>score;
i=score/10;
switch(i)
{
case 10:
case 9:
cout<<"you";
break;
case 8:
cout<<"liang";
break;
case 7:
case 6:
cout<<"zhong";
break;
default:
cout<<"cha";
}
}


2007-01-25 00:01
lele2003
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-12-20
得分:0 

谢谢了

2007-01-25 09:10



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-117963-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017548 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved