class base {
int i;
public:
base()
{
i = 10;
cout << "in the constructor" << endl;
}
};
int main()
{
base a;// here is the point of doubt
getch();
}
base a
和base a()
有什么区别?调用默认构造函数
在第一种情况下构造函数被调用,但不在第二种情况!
不应该说,它是'基地* A =新基地('? – Sid 2013-04-29 23:23:18
这个答案是否真的与问题相关?你没有解决'base b()' – narengi 2015-06-23 02:38:56