[QUESTION] echo system >> buffer ?
I'm building a C++ at the moment that needs to forward a few dos operations (netstat and pinging) But I need to read them into a buffer, and I don't want to do it the long way:
C:\someuser\somedir: netstat >> filebuffer.txt
and then read from it, please tell me there's a faster way of doing this!
Like doing something like this:
char buffer[1000];
system("netstat >> ", buffer);
Anyone?
try
[php]
cin >> buffer[1000]; //website to ping or whatever
system(("ping") buffer[1000]);
//or try this
string websiteToPing;
cin >> websiteToPing
system(("ping") websiteToPing);[/php]
tell me if it works?