class UnknownSymbol: public LexError{ public: const char symbol; UnknownSymbol(const unsigned int lineNumber, symbol) : LexError(lineNumber), symbol(symbol) {}; virtual const char* what() const throw() { std::string errorMessage; std::stringstream ss(std::stringstream::in | std::stringstream::out); ss << "Line " << lineNumber << ": Unknown Symbol detected: " << symbol; errorMessage = ss.str(); return errorMessage.c_str(); } };