473,320 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

what's the problem with my iterator?

the following code just won't compile,
.........
vector< vector< vector<int >::iterator
it1=fr.begin(),it1_end=fr.end();
for(;it1!=it1_end();it1++){
.........
the message from the compliler is
"36 E:\Dev-Cpp\pp.cpp no match for call to
`(__gnu_cxx::__normal_iterator<std::vector<std::ve ctor<int,
std::allocator<int, std::allocator<std::vector<int,
std::allocator<int *, std::vector<std::vector<std::vector<int,
std::allocator<int, std::allocator<std::vector<int,
std::allocator<int , std::allocator<std::vector<std::vector<int,
std::allocator<int, std::allocator<std::vector<int,
std::allocator<int >) ()' "

what's the problem?how to fix it?

Aug 28 '06 #1
6 1751
"Magcialking" <ma********@163.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
the following code just won't compile,
........
vector< vector< vector<int >::iterator
it1=fr.begin(),it1_end=fr.end();
for(;it1!=it1_end();it1++){
........
the message from the compliler is
"36 E:\Dev-Cpp\pp.cpp no match for call to
`(__gnu_cxx::__normal_iterator<std::vector<std::ve ctor<int,
std::allocator<int, std::allocator<std::vector<int,
std::allocator<int *, std::vector<std::vector<std::vector<int,
std::allocator<int, std::allocator<std::vector<int,
std::allocator<int , std::allocator<std::vector<std::vector<int,
std::allocator<int, std::allocator<std::vector<int,
std::allocator<int >) ()' "

what's the problem?how to fix it?
How is fr defined?

Is it
std::vector<std::vector<std::vector<int fr; ?
Aug 28 '06 #2
How is fr defined?

Is it
std::vector<std::vector<std::vector<int fr; ?
it's "vector<vector<vector<int >fr;"
with a "using namespace std" declarationn

Aug 28 '06 #3

Magcialking wrote:
How is fr defined?

Is it
std::vector<std::vector<std::vector<int fr; ?

it's "vector<vector<vector<int >fr;"
with a "using namespace std" declarationn
Can you post a small piece of self-contained code that illustrates the
problem? By self-contained, I mean something that we can cut and paste
and compile ourselves. So far, all you have a posted are little
snippets of code, which makes it much harder for us to help you.

By the way, you will often find that in the course of reducing the code
to a small, self-contained piece for you to post, you discover the
problem on your own.

Best regards,

Tom

Aug 28 '06 #4

"Magcialking" <ma********@163.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
the following code just won't compile,
........
vector< vector< vector<int >::iterator
it1=fr.begin(),it1_end=fr.end();
for(;it1!=it1_end();it1++){
When I try compiling this I get the problem that you're using it1_end()
instead of it1_end.

If that's your actual code, fix it and try again.
........
the message from the compliler is
"36 E:\Dev-Cpp\pp.cpp no match for call to
`(__gnu_cxx::__normal_iterator<std::vector<std::ve ctor<int,
std::allocator<int, std::allocator<std::vector<int,
std::allocator<int *, std::vector<std::vector<std::vector<int,
std::allocator<int, std::allocator<std::vector<int,
std::allocator<int , std::allocator<std::vector<std::vector<int,
std::allocator<int, std::allocator<std::vector<int,
std::allocator<int >) ()' "

what's the problem?how to fix it?

Aug 28 '06 #5
Jim Langston wrote:
"Magcialking" <ma********@163.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
the following code just won't compile,
........
vector< vector< vector<int >::iterator
it1=fr.begin(),it1_end=fr.end();
for(;it1!=it1_end();it1++){

When I try compiling this I get the problem that you're using it1_end()
instead of it1_end.

If that's your actual code, fix it and try again.
Sharp eyes, Jim!

Best regards,

Tom

Aug 28 '06 #6
When I try compiling this I get the problem that you're using it1_end()
instead of it1_end.

If that's your actual code, fix it and try again.
gosh,it seems that I really should go and take some sleep, good night
all,and thanks for your help!
Zzz...

Aug 28 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: lok | last post by:
i have a class: template <class T1, class T2> class CPairMapping { public: typedef std::pair<T1, T2> ValuePair_t; typedef std::vector<ValuePair_t> ValueList_t; typedef std::binary_function<...
13
by: Joseph | last post by:
I was doing my assignment,but encountered a problem at last step!!!!!! for easy reading, i ommited lots of other things //=====================code begin================================...
2
by: diadia | last post by:
string s = "hello"; const char *p = s.begin(); cout << p << endl; // print hello s = ""; char *p2= s.begin(); cout << p2 << endl; // print hello why?????
1
by: Joannes Vermorel | last post by:
I am currently trying to port a small open source scientfic library written in C++ to .Net. The code (including the VS solution) could be found at http://www.vermorel.com/opensource/selfscaling.zip...
15
by: fungus | last post by:
I'm moving some code from VC++ 6 to VC++ 2005 and I've run into a nasty problem because iterators are no longer pointers. In the program I'm moving, there's a std::vector of items hidden inside...
8
by: Fab | last post by:
All, I need your help understanding why the following code does *NOT* compile with G++ (tested with gcc 3.x and 4.1.x): ---------------------------------------------------------------------...
9
by: David | last post by:
Hi all, I posted my question two days ago, and tried to solve this problem. but until now I didn't solve that. and I cut my codes so maybe this time it is more readable. ...
27
by: Steven D'Aprano | last post by:
I thought that an iterator was any object that follows the iterator protocol, that is, it has a next() method and an __iter__() method. But I'm having problems writing a class that acts as an...
18
by: desktop | last post by:
1) I have this code: std::list<intmylist; mylist.push_back(1); mylist.push_back(2); mylist.push_back(3); mylist.push_back(4);
15
by: vivekian | last post by:
Hi, I have this following class class nodeInfo ; class childInfo { public: int relativeMeshId ;
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.