TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: KEVIN YOCHUM
from: CHRIS DOWNS
date: 1997-08-02 11:23:00
subject: Re: Conversion of pointer

 KY> void test( int i )
 KY> {
 KY> i=5;
 KY> return;
 KY> }
 KY> You're not getting a pointer back,
 
 CD> You aren't getting anything back!!
 KY> Sure you are!   You're getting the modified value of i.  In the
 KY> above, i would be an "in/out" parameter.
 
 Yes, you've modified 'i' in the routine, but there's no way that the
 calling routine can access the changed value of 'i'.  If you change
 the definition of test to:
 void test (int& i) {...}
 Then you could get back some sort of answer.
---
 þ Blue Wave/QWK v2.12 þ
---------------
* Origin: St. Louis Users Group (1:100/4)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.