cout << "Enter in the URL" << endl;
cin >> URL;
system("Ping");
i am trying to get the URL after the ping but im new in C++ and do not know the code to ping URL
cout << "Enter in the URL" << endl;
cin >> URL;
system("Ping");
i am trying to get the URL after the ping but im new in C++ and do not know the code to ping URL
You should probably go to a C++ forum, though. Try cplusplus.comCode:#include <iostream> #include <string> #include <stdlib.h> int main() { std::cout << "Enter url: "; std::string url; std::cin >> url; url = "ping " + url; return system(url.c_str()); }
Bookmarks