#include < iostream, h >
class point
{
private : float x, y ;
public : f( float a, float b) { x = a ; y = b ; }
f( ) {x=0;y=0;}
void getx( ) { cout < < x < < endl; }
void gety ( ) { cout < < y < < endl ; }
}
class point1
{
private : float x, y ;
public : f( float a, float b) { x = a; y = b ; }
f( ){x=1;y=1;}
void getx( ) {cout < <x < <endl;}
void gety( ) {cout < <y < <endl;}
};
main( ) {
point a;
a.f();
a. getx( ) ;a. gety ( );
}
}(类POINT声明结束处) 错误,因为类声明结束后用“;”结束