vc2005编译 Kriging 算法实现 2维和3维地图等高线 问题

zhuixe 2009-11-15 11:28:16
我在网上下了,Kriging 算法实现 2维和3维地图等高线 ,这个程序实在vc6.0下写的,
在2005下编译通不过,哪位高手给看看。
谢谢。
...全文
232 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
liuhaijun11 2011-08-10
  • 打赏
  • 举报
回复
楼主能否把这个代码给我一份,然后想和您讨论下.我的邮箱是hjliu@emails.bjut.edu.cn谢谢了!
rever10 2011-03-22
  • 打赏
  • 举报
回复
把Kriging.h的最后一行typedef TKriging<double, Point3D*> Kriging;
改成:
typedef TKriging<double, vector<Point3D>::iterator> Kriging;
我也遇到这个问题。原因是vector模板类的迭代器的定义发生了变化。
zhuixe 2009-11-18
  • 打赏
  • 举报
回复
再顶一下
zhuixe 2009-11-17
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 caozhy 的回复:]
(1)使用Native Win32,不要用 CLR
(2)降低编译器警告等级
把错误贴出来。
[/Quote]


(1)使用Native Win32,不要用 CLR 是什么意思
zhuixe 2009-11-17
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 caozhy 的回复:]
(1)使用Native Win32,不要用 CLR
(2)降低编译器警告等级
把错误贴出来。
[/Quote]

正在编译...
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 已跳过 ==========
LPR_Pro 2009-11-16
  • 打赏
  • 举报
回复
UP
threenewbee 2009-11-16
  • 打赏
  • 举报
回复
(1)使用Native Win32,不要用 CLR
(2)降低编译器警告等级
把错误贴出来。

19,468

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧