Re: better understanding references
From: thides (swatts_at_globalserve.net)
Date: 03/04/04
- Next message: David White: "Re: better understanding references"
- Previous message: thides: "Re: better understanding references"
- In reply to: jeffc: "Re: better understanding references"
- Next in thread: David White: "Re: better understanding references"
- Reply: David White: "Re: better understanding references"
- Reply: jeffc: "Re: better understanding references"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 4 Mar 2004 17:11:03 -0500
"jeffc" <nobody@nowhere.com> wrote in message
news:40475820_3@news1.prserv.net...
>
> "thides" <swatts@globalserve.net> wrote in message
> news:bWy1c.68187$lx2.42640@nntp-post.primus.ca...
> >
> > When is & (address of ) not used to take an address?
>
> When you're using it in the callee to mean "pass by reference" :-)
Yes but in the sort example my understanding is 'sort(int &i, int &j)'
accepts the address of what it is passed as oppose to the value. Its not
that we are dealing with the value but the address of the value of what is
passed. And as was pointed out in the FAQ or in one of the responses to the
original question the compiler does the dereferencing automatically so we
dont have to mess around with pointers. & is always related to addresses of
some type or meaning except used with binary or logical operators. Right?
>
>
- Next message: David White: "Re: better understanding references"
- Previous message: thides: "Re: better understanding references"
- In reply to: jeffc: "Re: better understanding references"
- Next in thread: David White: "Re: better understanding references"
- Reply: David White: "Re: better understanding references"
- Reply: jeffc: "Re: better understanding references"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|