在学MFC深入浅出是使用书中的一段程序:class CStroke : public CObject
{
public:
CStroke( UINT nPenWidth );
protected:
CStroke();
DECLARE_SERIAL( CStroke )
//Attributes
protected:
UINT m_nPenWidth;
public:
CArray<CPoint,CPoint> m_pointArray;
public:
BOOL DrawStroke( CDC* pDc );
public:
virtual void Serialize( CArchive &ar );
};
编译报错:
j:\myvcproject\step1\step1doc.h(25) : error C2143: syntax error : missing ';' before '<'
j:\myvcproject\step1\step1doc.h(25) : error C2501: 'CArray' : missing storage-class or type specifiers
j:\myvcproject\step1\step1doc.h(25) : error C2059: syntax error : '<'
j:\myvcproject\step1\step1doc.h(25) : error C2238: unexpected token(s) preceding ';'
请问怎么解决?谢谢
在线等答案