自考新教材-p145_6

源程序:

#include <iostream>
using namespace std;

class A
{
int a, b;
public:
A(int x = 0, int y = 0)
{
a = x;
b = y;
}
};
int main()
{
A *p;
p = new A(4,5);
system("pause");
return 1;
}

运行结果:

原文地址:https://www.cnblogs.com/duanqibo/p/12270109.html