64,637
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
using namespace std;
class A {
private:
int m_n;
public:
// A(void):m_n(0) {
// cout << "void" << endl;
// }
A(int n=0):m_n(n) {
cout << "no parameter constructor" << endl;
}
};
int main(void)
{
A* p1=new A;
A* p2=new A();
return 0;
}