我正在调用带有初始化列表的类的默认构造函数,并收到错误消息“初始化时没有匹配的构造函数”
classA.h
explicit classA();
classA.cpp
//mMember local member which is initialized.
classA::classA() : mMember(getInstance()) {
pObj = nullptr;
}
classB.cpp
classAobj = classA(); // getting error: no matching constructor for initialization
有人可以帮我解决我在这里遗失的东西吗。