home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!mustang.mst6.lanl.gov!ucsbcsl!mcl!ucosmo
- From: ucosmo@mcl.ucsb.edu (Boris Burtin)
- Newsgroups: comp.lang.c++
- Subject: Reference to a pointer??
- Keywords: pointer, reference
- Message-ID: <ucosmo.716157377@mcl>
- Date: 10 Sep 92 20:36:17 GMT
- Sender: root@ucsbcsl.ucsb.edu
- Lines: 21
-
- 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). I know
- that, for example, an int can be changed in a function like so:
-
- void f(int& i)
- {
- i = 0;
- }
-
- So why can't you do this:
-
- void f(int& *p)
- {
- p = 0;
- }
-
- Or do I just have the syntax wrong?
-
- --
- - Boris
- (cosmo@cs.ucsb.edu)
-