e:\vc program\test\testview.h(21) : error C2143: syntax error : missing ';' before '*'
e:\vc program\test\testview.h(21) : error C2501: 'CTestDoc' : missing storage-class or type specifiers
e:\vc program\test\testview.h(21) : error C2501: 'GetDocument' : missing storage-class or type specifiers

解决方案 »

  1.   

    我是利用了静态且分窗口,一个是ClistView的派生类,一个是CformView的派生类,结果在ClistView类中出现上述错误,并且包含有“testdoc.h"
      

  2.   

    将 testview.h 中第 21 行的代码贴出来啊。
      

  3.   

    在TestView.h头文件中的TestView类的实现之前加上class CTestDoc;也就是加上Doc类的声明注意,class小写,CTestDoc后面是个分号。如下:
    // TestView.h : header file
    ///////////////////////////////////////////////////////////////////////////////
    // CTestView view
    class CTestDoc;  //<-----加上这一行就可以了
    class CTestView : public CEditView
    {
    public:
    CTestView();   
    ................