-1
私は私の例外クラスを書いています:のオーバーロードのstd ::例外のconst char型に変換することができない何が()*
変換することはできません 'のstd :: __ cxx11 ::のbasic_string < _CharT、_Traits、_Alloc> :: c_str、STD ::アロケータ>' タイプから「constのchar型*(STD :: __ cxx11 ::のbasic_string :: )()const 'を入力すると' const char * ' return m_errorMsg.c_str;
私は間違っていますか? おかげ
'c_str'は関数です。あなたはそれを返さずに呼び出すべきです。 'return m_errorMsg.c_str;' => 'return m_errorMsg.c_str();' –
'throw()'を使うのはお勧めできません。 'C++ 11'では*廃止予定*です。 **参照:** http://en.cppreference.com/w/cpp/language/except_spec – Galik
私はcurrntly C++ 11で書いていません。 STD :: exceptionはthrow()を使用しています。私はそれを継承し、使用しないことを許されていますか?ありがとう – Hana