头文件 iostream 要引入
名字空间 std 要引入,并且不能有冲突的命名。
推荐这么写
#include
ret_type foo(arg_type arg ...)
{
...
std::cin<...
}
建议您这个样子改
#include
using namespace std;
int a,b;
double c;
int main(){
cin>>a>>b>>c;
........
}
cin does not name a type
1. 可能int main主函数的大括号没有打全
2.可能没有引入头文件
3.可能没有“std”
4.可能变量的名字重复了
发你的代码看看
求源代码,我再给你看看