#include<iostream.h>
class f{
private:int x,y;
public:f1(){x=0;y=0;}
print(){cout<<x<<〃<<y<<endl;}
}
main(){
f a;
a.f1(1,1);
a.print();
}
A.F1(1,1);错误
F1()调用时实参与形参数量不一致。
#include<iostream.h>
class f{
private:int x,y;
public:f1(){x=0;y=0;}
print(){cout<<x<<〃<<y<<endl;}
}
main(){
f a;
a.f1(1,1);
a.print();
}
#include<iostream.h>
class f{
private:int x,y;
public:f1(){x=0;y=0;}
print(){cout<<x<<〃<<y<<endl;}
}
main(){
f a;
a.f1(1,1);
a.print();
}
A.F1(1,1);错误
F1()调用时实参与形参数量不一致。