改错题:以下程序中有一处错误,请抄写有错误的语句并给出错误原因。1/1 文字题
#include < iostream. h >
class f{
private: int x,y;
public: f1( int a,int b) { x = a;y = b; }
void print( ) { cout << x << --<< y << endl; }
};
main( ) {
f a;
float x=1.0, y=2.0;
a. f1( x, y) ;
a. print( ) ;
}