The Following is my Code
FileNotReadableException Signature
FileNotReadableException ImplementationCode:class FileNotReadableException : public CGIException{ protected: const string& fileName; public: FileNotReadableException(); FileNotReadableException(const string& file); ~FileNotReadableException(); void setFileName(const string& file); const string& getFileName() const; };
It yields the following Compiler Error.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(){ }
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.........



LinkBack URL
About LinkBacks


