V
vfunc
I want to pass a list "node" to a function, read only access of the
list is fine, this is the relevant code I have so far
typedef std::vector<double> myvec;
typedef std::list<myvec> mylist; // a list of vectors
typedef mylist::const_iterator myiter;
void a(myiter &x)
{
int i;
....
// do something with
x
};
The compiler does not like x
"no match for operator [] .."
why is that?
How can I access the node like as if it were a myvec (by reference is
nice if that is OK).
Thanks.
list is fine, this is the relevant code I have so far
typedef std::vector<double> myvec;
typedef std::list<myvec> mylist; // a list of vectors
typedef mylist::const_iterator myiter;
void a(myiter &x)
{
int i;
....
// do something with
x
};
The compiler does not like x
"no match for operator [] .."
why is that?
How can I access the node like as if it were a myvec (by reference is
nice if that is OK).
Thanks.