我想知道如何在 Visual C++ 中编写非托管异常?
#include <string>
#include <exception>
using namespace std;
using namespace System;
class GraphException : public Exception
{
public:
GraphException() { }
// GraphException(string message) : Exception (message)
// { }
// GraphException(string message, Exception inner) : Exception (message, inner)
// { }
};
这不起作用我收到以下错误,
错误 1 错误 C3625:“GraphException”:非托管类型无法从托管类型“System::Exception”派生 c:\breadthfirst\graph\graphexception.h 10 1 breadthFirst
有人可以帮帮我吗?