I have a program that takes the counts of experiments as command string argument and outputs the sequence of floating numbers. Example: im_7.exe 10 10.41 13.33 8.806 14.95 15.55 13.88 10.13 12.22 9.09 10.45
So, i need to call this program in my program and analyze this sequence of numbers.
You can create a class that holds your data (with
>>
and<<
overloads)And then you can call it like so
On Linux the test pipe can be formed like so:
Not sure how to do pipes on Windows though...
Data that one program prints to standard output (
std::cout
in C++) can be piped to the standard input (std::cin
) of another program. The specifics of how the two programs are connected depends on the environment (specifically operating system and shell).If your are on windows then you need to do the following
For a sample have a look at the following link. http://msdn.microsoft.com/en-us/library/ms682499%28VS.85%29.aspx
Hope this is what you are looking for.