Answer the question
In order to leave comments, you need to log in
How to work with console programs from code?
Hello.
A bit of a stupid question, but still ─ I haven’t written for a detscope for a very long time, I wouldn’t want to produce bicycles.
How to work with console programs from code?
For example, get a list of connected android devices using the adb utility
>adb devices
List of devices attached
SH262TV02082 device
List of devices attached
SH262TV02082 device
Answer the question
In order to leave comments, you need to log in
Alas, you still have to cycle.
In the sense that you run a console program, redirect its output to your stream, and this output is already stupidly parsed
Use popen / _popen.
https://msdn.microsoft.com/en-us/library/96ayss4b.aspx
linux.die.net/man/3/popen
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question