The Following is my Code
FileNotReadableException Signature
Code:
class FileNotReadableException : public CGIException{
protected:
const string& fileName;
public:
FileNotReadableException();
FileNotReadableException(const string& file);
~FileNotReadableException();
void setFileName(const string& file);
const string& getFileName() const;
};
FileNotReadableException Implementation
Code:
FileNotReadableException::FileNotReadableException():fileName(""), CGIException(){
}
FileNotReadableException::FileNotReadableException(const string& file):fileName(file), CGIException("CGI::System::FileUnReadable", ("File: "+fileName+" Couldn't be opened for reading")){
}
void FileNotReadableException::setFileName(const string& file){
fileName = file;//Line 43 Here is teh Error
}
const string& FileNotReadableException::getFileName() const{
return fileName;
}
FileNotReadableException::~FileNotReadableException(){
}
It yields the following Compiler Error.
Code:
Line 43: error: passing ‘const std::string’ as ‘this’ argument of ‘std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::bas.........