Need help

closed account (z67Ly60M)
How do I check the internet conection? I'm can of noob. I looked on google ut I found nothin.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include <iostream>

#include <windows.h>


using namespace std;

int main()
{
    string user;
    string pass;
    string what;
    string left;
    string hippo;

 SetConsoleTitle("Hippo's Game");

    cout << "Enter User Name  " << endl;
    cin >> user;

    cout << "Enter Password " << endl;
    cin >> pass;


    if (user == "Test" || pass == "Test123" || user == "t" || user == "t")

    {
        cout << "Login successfull" << endl;
        cout << "Welcome to hippo's game!!" << endl;
        cout << "Moving you to home" << endl;
        cout << "****************************************************************************************************************************************************************================================================================================--------------------------------------------------------------------------------================================================================================****************************************************************************************************************************************************************  " << endl;\
        cout << "What Road Do You want go down? Left or Right?" << endl;
        cin >> what;
    }
    else
    {
        cout << "Login Failed" << endl;
    }

    if (what == "right")
    {
        cout << "You have completed the game!!" << endl;
    }

    if (what == "left")
    {
        cout << "you have been attacked by a hippo ! Do you want to run or attack?" << endl;
        cin >> left;
    }

    if (left == "run")
    {
        cout << "You have completed the game !!!" << endl;
    }

    if (left == "attack")
    {
        cout << "You have been eatin !! Restart to try again!!!" << endl;
    }




}
hippomods wrote:
I looked on google ut I found nothin.
Odd, when I Googled "C++ detect internet connection", I found this:
http://stackoverflow.com/a/17703474/1959975
closed account (z67Ly60M)
Gives me a error for line bool bConnect = InternetCheckConnection(url, FLAG_ICC_FORCE_CONNECTION, 0); can't see error in codeblocks :((
Did you #include the correct headers? You can't just copy and paste and expect things to magically work ;)
Last edited on
Topic archived. No new replies allowed.