Here's some source code that I've written a while back (it's actually the header source code)
How should I start to test this header file? (in other words, I need a driver to test teh CExeption class
Code:#ifndef CEXCEPTION_H #define CEXCEPTION_H class cException { const char* m_ErrorMessage; int m_ErrorCode; public: cException(int ErrorCode,const char* ErrorMessage) : m_ErrorCode( ErrorCode ) , m_ErrorMessage( ErrorMessage ) {} cException(cException& Ref) : m_ErrorCode( Ref.m_ErrorCode ) , m_ErrorMessage( Ref.m_ErrorMessage ) {} const char* ErrorMessage() const { return m_ErrorMessage ; } int ErrorCode() const { return m_ErrorCode ; } ~cException() {} }; #endif //#ifndef CEXCEPTION_H



LinkBack URL
About LinkBacks



CornedBee