Newsgroups: comp.lang.c++ Path: utzoo!utgpu!cunews!bnrgate!bwdls35!gwaters From: gwaters@bwdls35.bnr.ca (Glenn Waters) Subject: How to declare a reference to ptr var Message-ID: <1990Oct1.163755.20207@bnrgate.bnr.ca> Keywords: reference, pointer Sender: news@bnrgate.bnr.ca (USENET News System) Reply-To: gwaters@bwdls35.bnr.ca (Glenn Waters) Organization: Bell-Northern Research Date: Mon, 1 Oct 90 16:37:55 GMT I have a variable that is declared: char *x; I want to call a function saying: f(x); How do I declare the function, such that x comes in as a reference var. I tried a few different ways, to no avail... f( char * &xr )... f( char & *xr ) <-- I thought this should really work. Glenn Waters, Network Systems Support gwaters@bnr.ca Bell-Northern Research, Ltd. ...!uunet!bcars192!gwaters P.O. Box 3511, Station C (613)763-3933 (Voice) Ottawa Ontario Canada K1Y 4H7 (613)763-3283 (FAX) #include