home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!Germany.EU.net!pki-nbg!hitkw18!mhr
- From: mhr@hitkw18.pki-nbg.philips.de (Muharem Hrnjadovic)
- Newsgroups: comp.lang.c++
- Subject: Re: Reference to a pointer??
- Keywords: pointer, reference
- Message-ID: <mhr.716218309@hitkw18>
- Date: 11 Sep 92 13:31:49 GMT
- References: <ucosmo.716157377@mcl>
- Sender: news@pki-nbg.philips.de
- Lines: 29
-
- ucosmo@mcl.ucsb.edu (Boris Burtin) writes:
-
- >I have not been able to dig up any information on how to change a pointer
- >inside a function (aside from the good old dual-pointer C solution). ...
-
- .
- .
- .
-
- >So why can't you do this:
-
- >void f(int& *p)
- >{
- > p = 0;
- >}
-
- It should be the other way round :
-
- void f(int *& p)
- {
- p = 0;
- }
-
- now f() receives a reference to a pointer as its argument.
-
- Regards,
-
-
- -- Muharem
-