65,211
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <cstdlib>
using namespace std;
class Base
{
public:
static void statmem();
};
class D:Base
{
public:
void f(const D&);
};
void D::f(const D &d)
{
Base::statmem();
D::statmem();
d.statmem();
statmem();
}
int main()
{
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
class Base
{
public:
static void statmem()a{};////statmem缺少定义,这里加个{}
};
class D:Base
{
public:
void f(const D&);
};
void D::f(const D &d)
{
Base::statmem();
D::statmem();
d.statmem();
statmem();
}
int main()
{
system("pause");
return 0;
}