Hi,
I have something like this in my code:
struct s{
...
...
struct s* next;
...
...
};
In a main I have: vector<s> vs;
And I am using an iterator(vector<s>::iterator vsitr) to traverse the vector.
What I want to know is how to assign the struct s* next of the structure using
this iterator.
I am doing something like : struct s* next = &(*vsitr);
Is it correct? Seems to be working fine for me right now! Is there a cleaner ,
better and safer way to achieve this?
Thanks,
Saurabh
-----------------------------------------
I don't *mix* well socially....
but am readily *soluble* with alcohol...
____________________________________________________________________________________
Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings,
and more!
http://tv.yahoo.com/collections/3658