利用AppWizard生成单文档视程序tsgl,
在tsglView.h中:
// tsglView.h : interface of the CTsglView class
//
/////////////////////////////////////////////////////////////////////////////#if !defined(AFX_TSGLVIEW_H__9B5665E7_CADF_40C2_93BA_F803915C026A__INCLUDED_)
#define AFX_TSGLVIEW_H__9B5665E7_CADF_40C2_93BA_F803915C026A__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000//class CTsglSet;class CTsglView : public CRecordView
{
protected: // create from serialization only
CTsglView();
DECLARE_DYNCREATE(CTsglView)public:
//{{AFX_DATA(CTsglView)
enum{ IDD = IDD_TSGL_FORM };
// CTsglSet* m_pSet;
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA// Attributes
public:
CTsglDoc* GetDocument();// Operations
public:// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTsglView)
public:
virtual CRecordset* OnGetRecordset();
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL// Implementation
public:
virtual ~CTsglView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endifprotected:// Generated message map functions
protected:
//{{AFX_MSG(CTsglView)
// 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()
};#ifndef _DEBUG  // debug version in tsglView.cpp
inline CTsglDoc* CTsglView::GetDocument()
   { return (CTsglDoc*)m_pDocument; }
#endif///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_TSGLVIEW_H__9B5665E7_CADF_40C2_93BA_F803915C026A__INCLUDED_)编译报错:
error C2143: syntax error : missing ';' before '*'
error C2501: 'CTsglDoc' : missing storage-class or type specifiers
 'GetDocument' : missing storage-class or type specifiers
我查了半天,肯定没有漏 ;,哪位老大指点一下吧!