Check if windows internet is online

Hello, I have some problem to check if internet is online.

Edit // this code works

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include 
#include  
#include 
using namespace std;

int main(){

if(InternetCheckConnection("http://google.com", 1, 0))
{
     cout << "Sono connesso ad internet";
  }
else
{
     cout << "Non sono online";
    }
    }
Last edited on
Topic archived. No new replies allowed.