Answer the question
In order to leave comments, you need to log in
Why is the default constructor considered deleted for my class?
There is a class declaration in the pure.hpp file.
class ElementPurified_Constant : public BaseClasses::Nameable
{
//GetterSetterClass()
private:
PurifiedElement_Constants _properties;
public:
ElementPurified_Constant();
//ElementPurified_Constant(PurifiedElement_Constants);
~ElementPurified_Constant() {};
const std::string GetEnergyLevelsFormatted();
};
//static std::list<ElementPurified_Constant> PurifiedElements;
} }
#include "Pure.hpp"
using namespace Machinarium::Materials;
Machinarium::Materials::ElementPurified_Constant::ElementPurified_Constant()
{
}
Answer the question
In order to leave comments, you need to log in
PurifiedElement_Constants
does not have a default constructor (very inconvenient names you have ElementPurified_Constant
vs PurifiedElement_Constants
- pay attention, the error is not about your class, but about the type _properties
).
Those. a member _properties
in your class cannot be constructed without some parameters.
You need to explicitly call the constructor _properties
with some parameters in your class constructor:
Machinarium::Materials::ElementPurified_Constant::ElementPurified_Constant()
: _properties(some, valid, parameters)
{
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question