delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/22/07:54:46

Date: Mon, 22 Jun 1998 06:55:23 -0500 (CDT)
From: Andrew Deren <aderen AT eecs DOT uic DOT edu>
To: Sal <Sal AT Sal DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: how do I pass more than one value out of a function???
In-Reply-To: <358bfa94.0@news2.ibm.net>
Message-ID: <Pine.GSO.3.96.980622065339.25432A-100000@oscar.eecs.uic.edu>
MIME-Version: 1.0

On Sat, 20 Jun 1998, Sal wrote:

> I come from a pascal background... anyway, I know how to use a fundtion to
> ruturn a value.  What do I do to mave something that ruturns several
> values??
> 
If you use C++ you can use pass by reference.
Just put & after datatype 
ex.
int foo(int& temp1, int& temp2)

and when you change a value of temp1 and temp2 then the values
of the passed variables will be changed too.
It exhibits pascal var.

> Thanks ALLOT!!!!
> 
> 
> --
> 
> Salvador Santolucito III
> 
> 
>                                             o
>                           __o         </\_
>                           \<        __/\
>    /\o_             (()) (())           /
> ^^^^^^^^^^
> "I wish that I could think of an inspiring quote..."
>                                  -Salvador Santolucito III
> 
> 
> 
> 
> 
> 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019