[QUESTION] echo system >> buffer ?

Posts 1–3 of 3 · Page 1 of 1
[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?
No dude, I don't have to try that to tell that it won't work...
this:
system("netstat >> ", buffer);
Was just to server as an example, this is not possible in any way...
I appreciate your help though
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us