Calling an int function from another class and adding it to a local variable.

​ CourDec.h int getCredits() const; … … int Course::getCredits() const { return credits; /* Line 127 */ } SchDec.h #include "CourDec.h" using collectCred = std::vector<Course>; using iterator = collectCred::iterator; using const_iterator = collectCred::const_iterator; … … int getCredits() const; SchImp.cpp #include "SchDec.h" int Schedule::getCredits() const { int totalCredits = 0; collectCred credCheck; const_iterator it = credCheck.begin();…