In file included from main.cpp:17:0:
factory.h:12:46: error: ISO C++ forbids declaration of 'ObjIns' with no type [-fpermissive]
explicit ObjIns(const std::string& class_id):
^
factory.h:12:3: error: only declarations of constructors and conversion operators can be 'explicit'
explicit ObjIns(const std::string& class_id):
^~~~~~~~
factory.h: In member function 'int SubFactory::ObjIns(const string&)':
factory.h:13:5: error: only constructors take member initializers
callPhrase(class_id) {}
^~~~~~~~~~
factory.h:13:27: error: no return statement in function returning non-void [-Werror=return-type]
callPhrase(class_id) {}
^
factory.h: In member function 'Object* Factory::Create(const string&)':
factory.h:29:35: error: no matching function for call to 'SubFactory::SubFactory(const string&)'
return new SubFactory(class_id);
^
factory.h:10:7: note: candidate: SubFactory::SubFactory()
class SubFactory : public Object {
^~~~~~~~~~
factory.h:10:7: note: candidate expects 0 arguments, 1 provided
factory.h:10:7: note: candidate: SubFactory::SubFactory(const SubFactory&)
factory.h:10:7: note: no known conversion for argument 1 from 'const string {aka const std::__cxx11::basic_string<char>}' to 'const SubFactory&'
factory.h:10:7: note: candidate: SubFactory::SubFactory(SubFactory&&)
factory.h:10:7: note: no known conversion for argument 1 from 'const string {aka const std::__cxx11::basic_string<char>}' to 'SubFactory&&'
cc1plus: all warnings being treated as errors
|