我从CTreeView继承一个CView1类,为什么提示出下面的错误,我觉得不该出这样的错。请问为什么?
还有为什么用ADO在LAN里不能连上服务器的SQL数据库,服务器是WIN2000+SQL2000,客户机为VC ADO应用程序(在另一台机子上)

解决方案 »

  1.   

    e:\12\a\view1.h(14) : error C2504: 'CTreeView' : base class undefined
    E:\12\A\View1.cpp(17) : error C2440: 'return' : cannot convert from 'class CView1 *' to 'class CObject *'
            Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    E:\12\A\View1.cpp(17) : error C2653: 'CTreeView' : is not a class or namespace name
    E:\12\A\View1.cpp(17) : error C2065: 'classCTreeView' : undeclared identifier
    E:\12\A\View1.cpp(28) : error C2653: 'CTreeView' : is not a class or namespace name
    E:\12\A\View1.cpp(39) : error C2065: 'GetDocument' : undeclared identifier
    E:\12\A\View1.cpp(39) : error C2440: 'initializing' : cannot convert from 'int' to 'class CDocument *'
            Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
    E:\12\A\View1.cpp(49) : error C2653: 'CTreeView' : is not a class or namespace name
    E:\12\A\View1.cpp(54) : error C2653: 'CTreeView' : is not a class or namespace name
      

  2.   

    question two : u'd confirm ur local net is normal first ..then check ur code
      

  3.   

    包含文件头都齐了没有??/#include <afxcview.h>
      

  4.   

    看看 stdafx.h里有没有
    #include <afxcview.h>
    这一句先