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?
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?
Last edited by Kallisti; 09-06-2010 at 03:26 AM.
未来が見えなくて怖いから
未来が見えてしまって悲しいから
目を閉じて優しい思い出に浸ってしまう
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