c plus plus question

Is it possible to ping another computer using c++ and save the results in a text file or something?

Typing “ping.cpp” into http://www.google.com resulted in many links, including this one, which has source code for ping. The text file output feature is left as an exercise for the reader :wink:

Arjuna34

As Arjuna34 pointed out, sure it’s possible in c++, but is there any particular reason you want to do in in c++? It would be significantly easier to do it a language like perl. What OS are you using anyway? Is this part of a larger project, or do you just want to keep track of a Quake server somewhere? If your using unix or a varient, it can be done in one line of code. Let us know a bit more about what you’re trying to accomplish, and perhaps we can be of more help.