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)
|