Re: std::pair<,>

From: Mike Wahler (mkwahler_at_mkwahler.net)
Date: 10/04/03


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



Relevant Pages

  • Re: OT: Tom Deacon discusses the Middle East situation
    ... inviting attacks on a forum member. ... Any man who afflicts the human race with ideas must be prepared to see them misunderstood. ...
    (rec.music.classical.recordings)
  • Re: Background Image drawing
    ... I'm glad that I was helpfull;) ... I misunderstood your problem, I thought that you needed to have a background ... a variant so to speak: usinig a member of the ... > PictureBox class: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: OT/ Shows Today & Then
    ... but I don't identify with the boomers. ... Sorry, misunderstood. ... I consider myself a member of a certain economic strata. ... I don't know about permanent. ...
    (rec.arts.tv.soaps.cbs)
  • Re: Woodstock vs. Isle of Wight
    ... Thank you Marcus but I believe that you may have misunderstood my questions. ... If you go back to my post from last evening, I as a member of the 60s ...  None have seen fit to reply. ...
    (rec.music.dylan)