'exception' : base class undefined

#pragma once

#include <exception>

class CBaseException :

public exception

{

public:

CBaseException(void);

~CBaseException(void);

};



This class compiles fine usinfg .net2003 but fails with this message in .net2005

d:\projects\atest_2005_p\atest_2005_p\baseexception.h(6) : error C2504: 'exception' : base class undefined


Is there a solution



Answer this question

'exception' : base class undefined

  • BrandonFields

    thanks , this will work and I can make the minor mod required , 
      however I believe changes to the header have precluded the use of the freestanding implementation  of the exception class .

  • noop

    exception resides in the namespace std.

    Write 
    class CBaseException : public std::exception

    Or use
    using namespace std;

    HTH


  • 'exception' : base class undefined