"sonet" <so*******@msa.hinet.netwrote:
# in perl
# we can execute command and get result(command line stdout) by
#
# $a=`cmdline parameter`;
# print $a;
#
# in c
# system('cmdline parameter');
# but i can not get the result (command line stdout).
#
# in c++?
# ================================================== ===
# have any standard method do this job?
Since the C standard doesn't even interpret the string in the
system() call, you're out of luck with the C standard.
Other standards provide additional methods, such as the
popen in unix and some other systems. Unix also provides
additional ways to redirect stdin, stdout, and stderr
separately.
Decide what systems you're willing to abandon and code
to that standard.
--
SM Ryan
http://www.rawbw.com/~wyrmwif/
Who's leading this mob?