RE: [Dev-C++] sending and retrieving values from functions
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: James G. <Jam...@Cl...> - 2001-01-02 16:45:49
|
void my_number(void) is saying that the function my_number doesn't take any
parameters and doesn't return anything.
int my_number(void) returns a number, in the code use return ???; where ???
is either a magic number or a variable of type int.
E.g.
int another_function_call(int parameter1);
int my_number(void)
{
return another_function_call(100);
}
Regards,
James.
-----Original Message-----
From: jag [mailto:won...@th...]
Sent: Saturday, December 30, 2000 11:06 PM
To: devc++ mail-list
Subject: [Dev-C++] sending and retrieving values from functions
hi,
i'm studying a tutorial that makes use of a function named my_number.
at the beggining of the code before the main loop it is declared as
follows:-
void my_number(void);
the code for the routine is called from within the main loop by the command
my_number();
my question is, if i wanted a return value for one of the values in the
function my_number what command would i use?
The tutorial explains the use of the term void in the code saying that it is
used when there is no return values!
Is it possible for anyone to explain how i might send or retrieve values to
the function my_number?
thanks,
jag
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This electronic message and any attachment is intended to be
read by the named addressee(s) only.
Any other recipient should be aware that its contents may be
legally privileged and/or confidential and that its use,
disclosure, copying or distribution may be unlawful.
Unless you are a named addressee, please delete this message
Whilst C. & J. Clark International Limited has taken steps
to prevent the transmission of computer viruses with electronic mail,
responsibility for screening incoming messages and the risk of such
transmission and its consequences lies with the recipient.
C. & J. Clark International Limited
Registered in England and Wales
Company No. 141015
Registered Office: 40 High Street, Street, Somerset BA16 0YA
Telephone: +44 (0) 1458 443131
Fax: +44 (0) 1458 447547
|