Results 1 to 3 of 3
Can anyone tell me how to pass the variable (or) output result from one C program to another C++ program. (without using files).
Urgent.
Thanks....
- 03-22-2005 #1Just Joined!
- Join Date
- Jan 2005
- Location
- Bangalore
- Posts
- 4
C,C++ - Passing one program value/output to another program
Can anyone tell me how to pass the variable (or) output result from one C program to another C++ program. (without using files).
Urgent.
Thanks.
- 03-22-2005 #2Linux Engineer
- Join Date
- Nov 2004
- Location
- Montreal, Canada
- Posts
- 1,267
Re: C,C++ - Passing one program value/output to another prog
Are the 2 program actively running, or the C "opens" the C++ program with some parameters?
Originally Posted by namasivayam
If the C++ is running,
- file (easiest)
- socket (not the fastest)
- direct memory addressing (dangerous)
if the C++ program isnt running, simply pass the parameter as you open it and get the (args[]) with the proper option you want to make it do\"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
\"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps
- 03-23-2005 #3Just Joined!
- Join Date
- Mar 2005
- Posts
- 2
Well, that's not sufficient info, but if you plan to run the two programs separately and you want to redirect the output, you can just pipe/redirect the output
do something like
program1 | program2 or program1 > program2, depending upon what your needs are


Reply With Quote
