Im doing a code for 'ping' command.
can anyone tell me how to terminate the 'ping' process without using the ctrl-c.
I mean is there any way that we can define/fixed the send packet in 'ping'?
anyway, this is my code look like
using namespace std;
static string host;
static string ping_2;
cout << "Host: ";
cin >> host;
system (("ping " + host).c_str());
cout << endl;
cout << "Ping another host? Yes or No: ";
cin >> ping_2;
if (ping_2 == "Y" || ping_2 == "y")
else if (ping_2 == "N" || ping_2 == "n")
attention from anyone will really appreciate
Thanks in advance!