填空题
类中包含了一个静态成员函数,则main函数中和P. f1 (P); 语句具有同样功能的语句为 【11】 。
#include <iostream. h>
class M
public,
M(int a) A=a; B+=a;
static void f1(M m)
private:
int A;
static int B:
void M: :f1(M m)
cout<<"A="<<m. A<<endl;
cout<<"B="<<m. B<<endl;
int M: :B=10,
void main( )
M P(5);
P. f1(P);
【参考答案】
M::f1(P);