c++ - How to get output from other command line interface programs? -
OK I did some research and I could not change anything useful. I am trying to write a program that will receive input from iwconfig (on linux machine). It will then sort through the input, sorting some calculation and output into a database, sorting through input and output is not an issue (either I really hope that it does not happen) but I'm going to use another command line I am reading input from the program, I am struggling with it. I now have a base Hello World program: #include & lt; Iostream & gt; # Include & lt; Cstdlib & gt; using namespace std; Int main () {int numbr = 0; Cout & lt; & Lt; "Hello world!" & Lt; & Lt; Endl; Cin & gt; & Gt; Numbr; Cout & lt; & Lt; "Number is" & lt; & Lt; Numbr; Cout & lt; & Lt; System ("iwconfig"); Return 0; } While running the program, it's all Hello World production, ask for my random input and output it again. This output does not o...