将代码从Visual Studio 2005传输到VS 2010的问题 [英] The problem to transfer code from Visual Studio 2005 to VS 2010
本文介绍了将代码从Visual Studio 2005传输到VS 2010的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是C ++的新手。偶尔我有一个Visual Studio2005程序,使用pugxml.h,它完美无缺。
尝试在Visual Studio 2010中构建它后,我获得了下一个错误:
1> pugxml.h(1818):错误C2143:语法错误缺少,,在<"
代码之前
1817模板< class _Ty,class _Diff,class _Pointer,class _Reference>
1818 class xml_iterator:public std :: _Ranit< _Ty,_Diff,_Pointer,_Reference>
你能帮助我吗?
提前谢谢你。
Sergey Travin
电子邮件:travinso@yandex.ru
解决方案
嗨谢尔盖,
你提出这个问题已经很久了,但我会回答,因为它可以帮助其他人。
文件内 pugxml.h ,进行以下更改!!!
//来自:
class xml_iterator:public std :: _ Ranit< _Ty,_Diff,_Pointer,_Reference>
// To:
class xml_iterator:public std :: iterator< std :: input_iterator_tag,_Ty,_Diff,_Pointer,_Reference>
问候,
WLRoger
不保证这会起作用,但尝试定义 _HAS_CPP0X = 0
在项目的编译器定义中。
Hallo!
I am novice in C++. Occasionaly I got a program for Visual Studio2005, using pugxml.h wich works perfect.
After trying to construct it in Visual Studio 2010 I obtain next error:
1> pugxml.h(1818): error C2143: syntax error absence of "," before "<"
for code
1817 template < class _Ty,class _Diff,class _Pointer,class _Reference>
1818 class xml_iterator:public std :: _Ranit <_Ty, _Diff, _Pointer, _Reference>
Could You help me?
Thank You in advance.
Sergey Travin
email: travinso@yandex.ru
解决方案
Hi Sergey,
It's already a long time since you made this question, but I'll answer anyway cause it can help other people.
Inside the file pugxml.h, make the following change !!!
// From: class xml_iterator : public std::_Ranit<_Ty,_Diff,_Pointer,_Reference> // To: class xml_iterator : public std::iterator<std::input_iterator_tag, _Ty, _Diff, _Pointer, _Reference>
Regards,
WLRoger
No guarantees that this is going to work, but try defining _HAS_CPP0X=0
in the project's compiler definitions.
这篇关于将代码从Visual Studio 2005传输到VS 2010的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文