Boost logo

Boost :

From: Ekkachart Hattha (ekkachart_at_[hidden])
Date: 2000-09-12 09:25:51


Can anyone help and teach me how to access to the
object contained within STL?

My problem is If I have a class below:

class Point {
// Any constructor !!!
//
protected:
int get_x(){return x;}
int get_y(){return y;}
int x, y;
};

Moreover I want to contain this class into
        list<queue<Point> > mylist;
I want to insert the value of x and y into queue 4
times and then push these values into list 1 times and
then start again pushing the same 3 times Thus I can
push 16 values of x and y into list<queue<Point> >.

Unfortunately I don't know how to get or access to the
member of class Point such as get_x(). And If I have
an array of class Point such as mylist[10]. I want to
know how to get the value of x and y by STL iterator
by using its gramma or syntax.

Thanks in advance,
Ekkachart Hattha.

__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk