为什么当我用另一个对象的副本初始化类对象的构造函数时它不起作用?
class Human
{
int No;
public:
Human(int arg):No(arg)
{
cout<<"constructor Works"<<endl;
}
};
int main()
{
Human a{10}; // constructor Works for object a
Human b{a}; //why b object's constructor dont work?
}