Call external C programs and receive data
Hi,
I'd like to know if I can call a program from a program and receive result.
I've this complied C program (Called):
Code:
/* omissis header */
int main()
{
int i = 0;
i = rand();
return i;
}
Can I call this program from another C program and receive "i" ?
My pseudo-code would be:
Code:
/* omissis */
int dest = 0;
dest = call Called program;
/* omissis */
Does the "return" instruction pass data also through compiled programs?
How to do it? How to call external programs?
Thanks