Zi 字媒體
2017-07-25T20:27:27+00:00
Linux C/C++ ping_check_Internet(網路測試)
資料來源: https://github.com/jash-git/Jash_LinuxC/tree/master/Linux_CPP_ping_check_Internet
code:
#include
#include
#include
#include
using namespace std;
int main()
{
if (system("ping -c1 -s1 www.google.com"))
{
cout << "There is no internet connection \n";
}
else
{
cout << "There is internet connection \n";
}
return 0;
}
寫了
5860316篇文章,獲得
23313次喜歡