I'm new to C++ and dont know why this is happening and how to fix it. Here's some snippets of the code:
header file:
class Dictionary{
private:
string filename;
const string theSeparators;
public:
Dictionary(const string& filename, const string& separators = "\t\n");
Dictionary() = delete;
~Dictionary() = default;
Dictionary(const Dictionary&) = default;
Dictionary(Dictionary&&) = default;
Dictionary& operator=(const Dictionary&) = default;
Dictionary& operator=(Dictionary&&) = default;
};
cpp file:
Dictionary::Dictionary(const string& filename, const string& separators = "\t\n"){
/* some stuff for the filename*/
}
error: copy assignment operator of 'Dictionary' is implicitly deleted because field 'theSeparators' has no copy assignment operator
const string theSeparators;
error:move assignment operator of 'Dictionary' is implicitly deleted because field 'theSeparators' has no move assignment operator
const string theSeparators;