我正在尝试实现一本教科书中的代码示例。它正在尝试使用下面的代码从Exception创建继承的exception类。#include <stdexcept>using namespace std;
class TargetNotFoundException: public exceptionTarget not found: " + message.c_str()){ } //
我想从stdexcept的逻辑错误中创建我自己的错误。我尝试了以下方法,但遇到了错误,我的猜测是,这不是正确的方法。我在google或之前的堆栈溢出问题上找不到答案,请原谅我的粗鲁。// Header{ My_custom_exception(string message它给出了以下错误:
exception.cpp: In con