Re: pointers and array of pointers
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Mon, 02 Apr 2007 21:28:33 -0400
Klarth wrote:
I often think of pointers as a VARIABLE that contains a reference
to an address. So when you are calling myswap, you are passing in
copies of the references. Want you want to do in myswap is pass the
pointers by reference so you can change it. You do this by passing
in type char ** and passing the address of the pointers instead. In
myswap2, you are already effectively passing by reference, which is
why the swap is reflected when it returns.
What, if anything, does this mean? See below.
--
If you want to post a followup via groups.google.com, ensure
you quote enough for the article to make sense. Google is only
an interface to Usenet; it's not Usenet itself. Don't assume
your readers can, or ever will, see any previous articles.
More details at: <http://cfaj.freeshell.org/google/>
--
Posted via a free Usenet account from http://www.teranews.com
.
- References:
- pointers and array of pointers
- From: Piotrek
- Re: pointers and array of pointers
- From: Klarth
- pointers and array of pointers
- Prev by Date: Re: The weird while and If
- Next by Date: Re: on italians
- Previous by thread: Re: pointers and array of pointers
- Next by thread: Re: pointers and array of pointers
- Index(es):
Relevant Pages
|