[求助]帮帮小弟,遇见一个错误
#include<iostream.h>
void main()
{int a,b;
cout<<"a=";
cin>>a>>endl;
cout<<"b=";
cin>>b;
cout<<"a+b="<<a+b;
}
编写好源程序后compile,
提示
001.obj - 1 error(s), 0 warning(s)
上面分析的原因是
--------------------Configuration: 00 - Win32 Debug--------------------
Compiling...
001.cpp
c:\program files\microsoft visual studio\myprojects\00\001.cpp(5) : error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'class ostream &(__cdecl *)(class ostream &)' (or there is no acceptable conversion)
Error executing cl.exe.
[此贴子已经被作者于2006-12-8 13:40:26编辑过]