David wrote:
im trying to figure out how to pipe data to an application with c++
Here is how I would do it in perl
open(OSA, "| /usr/bin/osascript") || die "Can't pipe to osascript";
print OSA "some text to pipe\n";
close(OSA);
can someone show me the equivilent in c++?
thanks
You can do one of the following:
1. Redirect the standard output to some file or other file interface
using
stream = freopen( "freopen.out", "w", stdout );
(you can replace stdout with stderr to redirect standard error)
2. Use Interprocess Communication Mechanism. If you use unix I can't
help you there. You should search for it.
3. Btw, you can simply use pipe. Use the command to redirect the
standard output...