64,639
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include <windows.h>
#include <WinInet.h>
#include <iostream>
#pragma comment(lib,"wininet.lib")
using namespace System;
using namespace std;
int main(array<System::String ^> ^args)
{
if(InternetCheckConnection(L"http://www.163.com", FLAG_ICC_FORCE_CONNECTION ,0)) cout<<"网络连接成功" <<endl;
else cout<<"网络连接失败"<<endl;
getchar();
return 0;
}