我在网上下了,Kriging 算法实现 2维和3维地图等高线 ,这个程序实在vc6.0下写的,
在2005下编译通不过,哪位高手给看看。
谢谢。

解决方案 »

  1.   

    (1)使用Native Win32,不要用 CLR
    (2)降低编译器警告等级
    把错误贴出来。
      

  2.   


    正在编译...
    1>3DContourView.cpp
    1>d:\软件代码和资料\mofat程序和资料\kriging 算法实现 2维和3维地图等高线\baseexception.h(23) : warning C4996: 'sprintf' was declared deprecated
    1>        c:\program files\microsoft visual studio 8\vc\include\stdio.h(345) : see declaration of 'sprintf'
    1>        Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
    1>d:\软件代码和资料\mofat程序和资料\kriging 算法实现 2维和3维地图等高线\3dcontourview.cpp(104) : error C2664: 'TKriging<T,ForwardIterator>::TKriging(const ForwardIterator,const ForwardIterator,double)' : cannot convert parameter 1 from 'std::_Vector_iterator<_Ty,_Alloc>' to 'TPoint3D<T> '
    1>        with
    1>        [
    1>            T=double,
    1>            ForwardIterator=Point3D *
    1>        ]
    1>        and
    1>        [
    1>            _Ty=Point3D,
    1>            _Alloc=std::allocator<Point3D>
    1>        ]
    1>        and
    1>        [
    1>            T=double
    1>        ]
    1>        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    1>d:\软件代码和资料\mofat程序和资料\kriging 算法实现 2维和3维地图等高线\3dcontourview.cpp(110) : error C2065: 'input' : undeclared identifier
    1>d:\软件代码和资料\mofat程序和资料\kriging 算法实现 2维和3维地图等高线\3dcontourview.cpp(110) : error C2228: left of '.begin' must have class/struct/union
    1>        type is ''unknown-type''
    1>d:\软件代码和资料\mofat程序和资料\kriging 算法实现 2维和3维地图等高线\3dcontourview.cpp(110) : error C2228: left of '.end' must have class/struct/union
    1>        type is ''unknown-type''
    1>ContourView.cpp
    1>d:\软件代码和资料\mofat程序和资料\kriging 算法实现 2维和3维地图等高线\baseexception.h(23) : warning C4996: 'sprintf' was declared deprecated
    1>        c:\program files\microsoft visual studio 8\vc\include\stdio.h(345) : see declaration of 'sprintf'
    1>        Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
    1>d:\软件代码和资料\mofat程序和资料\kriging 算法实现 2维和3维地图等高线\contourview.cpp(122) : error C2664: 'TKriging<T,ForwardIterator>::TKriging(const ForwardIterator,const ForwardIterator,double)' : cannot convert parameter 1 from 'std::_Vector_iterator<_Ty,_Alloc>' to 'TPoint3D<T> '
    1>        with
    1>        [
    1>            T=double,
    1>            ForwardIterator=Point3D *
    1>        ]
    1>        and
    1>        [
    1>            _Ty=Point3D,
    1>            _Alloc=std::allocator<Point3D>
    1>        ]
    1>        and
    1>        [
    1>            T=double
    1>        ]
    1>        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    1>d:\软件代码和资料\mofat程序和资料\kriging 算法实现 2维和3维地图等高线\contourview.cpp(128) : error C2664: 'TInterpolater<ForwardIterator>::GetInterpolatedZ' : cannot convert parameter 3 from 'std::_Vector_iterator<_Ty,_Alloc>' to 'TPoint3D<T> '
    1>        with
    1>        [
    1>            ForwardIterator=Point3D *
    1>        ]
    1>        and
    1>        [
    1>            _Ty=Point3D,
    1>            _Alloc=std::allocator<Point3D>
    1>        ]
    1>        and
    1>        [
    1>            T=double
    1>        ]
    1>        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    1>d:\软件代码和资料\mofat程序和资料\kriging 算法实现 2维和3维地图等高线\contourview.cpp(152) : warning C4018: '<' : signed/unsigned mismatch
    1>d:\软件代码和资料\mofat程序和资料\kriging 算法实现 2维和3维地图等高线\contourview.cpp(201) : warning C4018: '<' : signed/unsigned mismatch
    1>Generating Code...
    1>Skipping... (no relevant changes detected)
    1>3DGrapher.cpp
    1>ChildFrm.cpp
    1>ContourDoc.cpp
    1>Dib.cpp
    1>GLSurfaceView.cpp
    1>InputReader.cpp
    1>MainFrm.cpp
    1>OptionDlg.cpp
    1>Surfer.cpp
    1>WaferPainter.cpp
    1>WaferPainterDoc.cpp
    1>WaferPainterView.cpp
    1>生成日志保存在“file://d:\软件代码和资料\Mofat程序和资料\Kriging 算法实现 2维和3维地图等高线\Debug\BuildLog.htm”
    1>WaferPainter - 6 个错误,4 个警告
    ========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========
      

  3.   

    (1)使用Native Win32,不要用 CLR   是什么意思
      

  4.   

    把Kriging.h的最后一行typedef TKriging<double, Point3D*> Kriging;
    改成:
    typedef TKriging<double, vector<Point3D>::iterator> Kriging;
    我也遇到这个问题。原因是vector模板类的迭代器的定义发生了变化。
      

  5.   

    楼主能否把这个代码给我一份,然后想和您讨论下.我的邮箱是[email protected]谢谢了!