In article <11**********************@z14g2000cwz.googlegroups .com>,
Jyotirmoy <jy*******@gmail.com> wrote:
You can't read back a value from a void function. For your problem, you
have two options. You've to chage the function declaration so that it
returns the desired value (int or char *) or you have to pass a pointer
as an argument to the void function.
Another possibility suitable in -some- instances is to set a variable
that is in the scope of both the called and calling function; that
could be file scope or a "global variable".
And a different hack that is sometimes used in difficult situations is,
on systems that support it (as it is not pure C) to set an environment
variable.
In between, there are possibilities involving temporary files, or
pipes, or shared memory segments, or STREAMS... definitely not all
portable.
--
'ignorandus (Latin): "deserving not to be known"'
-- Journal of Self-Referentialism