I have the following code.
我有以下代码。
#include <exception>
public MyException : public std::exception {
private:
const char* MESSAGE = "ExceptionReport";
protected:
static const int MAX_MESSAGE_LENGTH = 200;
char composedMessage[MyException::MAX_MESSAGE_LENGTH];
public:
virtual const char* what() const throw() {
strcpy(this->composedMessage, this->MESSAGE);
return this->composedMessage,
}
};
#include