Re: std::pair<,>
From: Mike Wahler (mkwahler_at_mkwahler.net)
Date: 10/04/03
- Next message: Jonathan Mcdougall: "Re: The worst 'hello world' example ever written..."
- Previous message: cheeser: "Re: Mini project suggestions"
- In reply to: Jonathan Mcdougall: "Re: std::pair<,>"
- Next in thread: Neil Zanella: "Re: std::pair<,>"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 04 Oct 2003 02:27:40 GMT
"Jonathan Mcdougall" <jonathanmcdougall@DELyahoo.ca> wrote in message
news:mrpfb.37030$yV2.747489@weber.videotron.net...
> > > So, if you want a Point with members x and
> > > y, why not subclass?
> >
> > Why not simply:
> >
> > std::pair<int,int> coord(x,y);
> >
> > or if you like:
> >
> > typedef std::pair<int,int> Point;
> >
> > Point coord(x,y);
>
> The thig is
>
> coord.first = 2;
>
> is not quite representative, as opposed to
>
> coord.x = 2;
Ah, ok I misunderstood. He wants specific member
names.
"Ne-e-e-e-e-ver Mind!"
-Gilda Radner
-Mike
- Next message: Jonathan Mcdougall: "Re: The worst 'hello world' example ever written..."
- Previous message: cheeser: "Re: Mini project suggestions"
- In reply to: Jonathan Mcdougall: "Re: std::pair<,>"
- Next in thread: Neil Zanella: "Re: std::pair<,>"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|