我自己写了一个简单的类CLine;
但是当我在CHelloDoc中,写一个函数: CLine *hello(); 
头文件也已经包含了,但是一编译,就报错syntax error : missing ';' before '*'
但是不知道为什么。
// HelloDoc.cpp : implementation of the CHelloDoc class
//#include "stdafx.h"
#include "Hello.h"
#include "HelloDoc.h"#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//
class CHelloDoc : public CDocument
{
protected: // create from serialization only
CHelloDoc();
DECLARE_DYNCREATE(CHelloDoc)// Attributes
public:// Operations
public:// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHelloDoc)
public:
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
//}}AFX_VIRTUAL// Implementation
public:
CLine * hello();//////此处出错 syntax error :missing ';before '*'
virtual ~CHelloDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endifprotected:// Generated message map functions
protected:
//{{AFX_MSG(CHelloDoc)
// NOTE - the ClassWizard will add and remove member functions here.
//    DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};