我有两节课
class a {
public:
a(int i);
};
class b {
public:
b(); //Gives me an error here, because it tries to find constructor a::a()
a aInstance;
}
Run Code Online (Sandbox Code Playgroud)
我怎样才能得到它以便aInstance用(int i)实例化而不是试图搜索默认构造函数?基本上,我想从b的构造函数中控制对构造函数的调用.