C++ error
来源:百度知道 编辑:UC知道 时间:2024/09/20 17:48:01
void putdata( double woker[][5],int n){
int i,j;
for(i=0;i<n;i++)
cout<<'k'<<i+1<<"的工资:";
for(j=0;j<4;j++)
cin>>woker[i][j]>>endl;
}
d:\text\pay\pay.cpp(24) : error C2679: 二进制“>>” : 没有找到接受“<未知>”类型的右操作数的运算符(或没有可接受的转换)
int i,j;
for(i=0;i<n;i++)
cout<<'k'<<i+1<<"的工资:";
for(j=0;j<4;j++)
cin>>woker[i][j]>>endl;
}
d:\text\pay\pay.cpp(24) : error C2679: 二进制“>>” : 没有找到接受“<未知>”类型的右操作数的运算符(或没有可接受的转换)
void putdata( double woker[][5],int n){
int i,j;
for(i=0;i<n;i++)
{
cout<<'k'<<i+1<<"的工资:";
for(j=0;j<4;j++)
cin>>woker[i][j];
}
}
你那样worker[i][j]中的i会是固定的n-1,没进入循环
cin>>woker[i][j]>>endl; //输入语句不用加endl
cin>>woker[i][j]; 这样即可
输入语句不用换行。
cin>>woker[i][j];//不用加>>endl;
用cin读入数据,自动换行的。
常识哦~
error:rumtime error 204 at 0040249C
C语言declaration syntax error
Data error reading drive C
C程序出错:error C2059: syntax error : '{'
c语言问题:error C2059: syntax error : ']'
倾家荡产求助:“C语言 declaration syntax error”
Ruantime error 183 at 0440385C
Data error reading drive C.是什么意思?
runtime error at 0040249C 204
runtime error 204 at 0040249c