在vc++6.0中:
class CStudent : public CEdit
{
// Construction
public:
CString csCode; //学号
CString csName; //姓名
CString csclass; //班级
float csmath;
float csenglish;
float cscomputer;
CStudent();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CStudent)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CStudent();
// Generated message map functions
protected:
//{{AFX_MSG(CStudent)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
在.cpp 文件中写入:public CStudent Student[20];
出现错误:error C2143: syntax error : missing ';' before 'public'
请问这是为什么呢?谢谢~~
试过了 不可以亚 还是这个错误