Re: better understanding references

From: thides (swatts_at_globalserve.net)
Date: 03/04/04


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?
>
>



Relevant Pages

  • Re: better understanding references
    ... > accepts the address of what it is passed as oppose to the value. ... > that we are dealing with the value but the address of the value of what is ... > dont have to mess around with pointers. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Java and Windows GUI Integration
    ... Mustafa K. Isik wrote: ... I'm set out to look into and can provide me with pointers to material ... dealing with similar issues. ...
    (comp.lang.java.gui)
  • Re: PING: Keith Allen
    ... > Your dealing with a protagonist not an idiot you should realise that ... > all attempts to oppose me are futile. ...
    (uk.adverts.computer)
  • Re: huge pointer
    ... > malikguna@yahoo.com writes: ... > Unless the book is dealing with computing history, huge pointers ... fixes many of the shortcomings of Windows 98 SE". ...
    (comp.lang.c)
  • Re: NULL macro vs. 0 as null pointer?
    ... - NULL can make it more clear in the code that you are expecting and dealing ... with pointers, but NULL is not part of the language proper, but part of the ... it can lead some loss of code clarity when dealing w/ pointers (specifically ...
    (comp.lang.cpp)