I am calling a default constructor of a class with initializer list and getting error 'no matching constructor for initialization'
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
Can somebody help with what I am missing here.
Aucun commentaire:
Enregistrer un commentaire