Thursday, October 25, 2007

Common Class Declaration Mistake

class CComboCellTypeArgs : public HotListCtrlCellTypeArgs
{

public:
CComboCellTypeArgs(void);
virtual ~CComboCellTypeArgs(void);

public:
CStringArray m_arrString;
}

If u just missed to write a semicolon after class declaration, u will be get some horrible compilation error like the following:

error C2533: 'HotListCtrlCellTypeArgs::{ctor}' : constructors not allowed a return type

So don’t miss to write the semicolon after class declaration!!!

No comments: