|
Pipe data to external program using popen
|
|
02-02-2010, 08:30 AM
(This post was last modified: 02-02-2010 08:37 AM by codecaine.)
Post: #1
|
|||
|
|||
|
Pipe data to external program using popen
What this program do is send my array of strings to the sort progarm in linux or unix base system. The result is that my array is printed on the screen sorted.
Code: #include <string>I modified my first program to show you that you can do multiple pipes. popen("sort | more", "w") just like you do in bash I send data to sort once sort program sorts my data it pipes it to the more program the more program just pauses the screen so you can read all the data and scroll down at your own pace. Code: #include <string> |
|||
|
« Next Oldest | Next Newest »
|






