| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:VC7的关于结构体的编译错误如何解决呢???In Reply To:VC7的关于结构体的编译错误如何解决呢??? Posted by:c4pt0r at 2008-09-08 10:25:58 > RT~~~~在VC6下完全没问题 > > > Compile Error > > Main.cpp > xutility(764) : error C2039: 'iterator_category' : is not a member of 'T'; Main.cpp(18) : see declaration of 'T'; Main.cpp(72) : see reference to class template instantiation 'std::iterator_traits<_Iter> with [_Iter=T]' being compiled > xutility(764) : error C2146: syntax error : missing ';' before identifier 'iterator_category' > xutility(764) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int > xutility(764) : error C2602: 'std::iterator_traits<_Iter> with [_Iter=T]::iterator_category' is not a member of a base class of 'std::iterator_traits<_Iter> with [_Iter=T]'; xutility(764) : see declaration of 'std::iterator_traits<_Iter> with [_Iter=T]::iterator_category' > xutility(764) : error C2868: 'std::iterator_traits<_Iter> with [_Iter=T]::iterator_category' : illegal syntax for using-declaration; expected qualified-name > xutility(765) : error C2039: 'value_type' : is not a member of 'T'; Main.cpp(18) : see declaration of 'T' > xutility(765) : error C2146: syntax error : missing ';' before identifier 'value_type' > xutility(765) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int > xutility(765) : error C2602: 'std::iterator_traits<_Iter> with [_Iter=T]::value_type' is not a member of a base class of 'std::iterator_traits<_Iter> with [_Iter=T]'; xutility(765) : see declaration of 'std::iterator_traits<_Iter> with [_Iter=T]::value_type' > xutility(765) : error C2868: 'std::iterator_traits<_Iter> with [_Iter=T]::value_type' : illegal syntax for using-declaration; expected qualified-name > xutility(766) : error C2039: 'difference_type' : is not a member of 'T'; Main.cpp(18) : see declaration of 'T' > xutility(766) : error C2146: syntax error : missing ';' before identifier 'difference_type' > xutility(766) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int > xutility(766) : error C2602: 'std::iterator_traits<_Iter> with [_Iter=T]::difference_type' is not a member of a base class of 'std::iterator_traits<_Iter> with [_Iter=T]'; xutility(766) : see declaration of 'std::iterator_traits<_Iter> with [_Iter=T]::difference_type' > xutility(766) : error C2868: 'std::iterator_traits<_Iter> with [_Iter=T]::difference_type' : illegal syntax for using-declaration; expected qualified-name > xutility(768) : error C2039: 'pointer' : is not a member of 'T'; Main.cpp(18) : see declaration of 'T' > xutility(768) : error C2146: syntax error : missing ';' before identifier 'pointer' > xutility(768) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int > xutility(768) : error C2602: 'std::iterator_traits<_Iter> with [_Iter=T]::pointer' is not a member of a base class of 'std::iterator_traits<_Iter> with [_Iter=T]'; xutility(768) : see declaration of 'std::iterator_traits<_Iter> with [_Iter=T]::pointer' > xutility(768) : error C2868: 'std::iterator_traits<_Iter> with [_Iter=T]::pointer' : illegal syntax for using-declaration; expected qualified-name > xutility(769) : error C2039: 'reference' : is not a member of 'T'; Main.cpp(18) : see declaration of 'T' > xutility(769) : error C2146: syntax error : missing ';' before identifier 'reference' > xutility(769) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int > xutility(769) : error C2602: 'std::iterator_traits<_Iter> with [_Iter=T]::reference' is not a member of a base class of 'std::iterator_traits<_Iter> with [_Iter=T]'; xutility(769) : see declaration of 'std::iterator_traits<_Iter> with [_Iter=T]::reference' > xutility(769) : error C2868: 'std::iterator_traits<_Iter> with [_Iter=T]::reference' : illegal syntax for using-declaration; expected qualified-name > > using namespace std; 换成:using std::后面是要用到的容器或者cin,cout,endl等等. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator