Re:[Dev-C++] sending and retrieving values from functions
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Emry <em...@te...> - 2001-01-02 20:32:41
|
The simplest way to do this, would be to first of all, declare the function as int my_number(void); This is assuming you want it to return an integer. Otherwise replace int with whichever type you want it to return. If you are using c++ then the void in parenthasis is not needed. then for the terminating line of the function return somevalue; where somevalue is a value or variable of the correct type. |