Today I thought to make a Simple Program for Fun. I haven't started learning C++ yet but I learned a little and i will learn the rest in later Day.
Then I tried to make a Program Like this
When user Input an URL program Pings it and then Show ping Results.
I made a Program but it doesn't work well it always says "Enter URL". I entered an URL but it still says "Enter URL"
And I think MY code is Wrong. Can you Give Me the Correct code?
Here is the Code
Code: Select all
#include<iostream>
#include<string>
using namespace std;
int main ()
{
string url;
float ping;
cout<<"Enter URL";
cin>>url;
ping=system("ping"),url;
cout <<ping;
cin.get();
return 0;
}