Coding Issues

I'm not really sure what's gone wrong, but when I try to compile it gives me an error and highlights the first cout line:

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
#include <iostream>

using namespace std;

int main ()
{
    char response
        cout << "Hello. My name is Suicide.exe. Would you like to end it all today?\n";
        cin >> response;
            if (response == 'y' or response == 'Y')
            {
                cout << "Which of the following methods would you like to apply?\n";
                cout << "A. Gun\n";
                cout << "B. Knife\n";
                cout << "C. Potato\n";
                cin >> response;
                    if (response == 'a' or response == 'A')
                    {
                        cout << "You have been shot to death. Thank you for dying with Suicide.exe.\n";
                    }
                    else if (response == 'b' or response == 'B')
                    {
                        cout << "You have been stabbed to death. Thank you for dying with Suicide.exe.\n";
                    }
                    else if (response == 'c' or response == 'C')
                    {
                        cout << "Potatoes are not a valid form of suicide. Thank you for wasting time with Suicide.exe.\n";
                    }
            }
            else if (response == 'n' or response == 'N')
            {
                cout << "Would you like to:\n";
                cout << "A. Discuss alternatives\n";
                cout << "B. Exit\n";
                cin >> response;
                    if (response == 'a' or response == 'A')
                    {
                        cout << "Which alternative would you like?\n";
                        cout << "A. Suicide\n";
                        cout << "B. Suicide\n";
                        cout << "C. Suicide\n";
                        cin >> response;
                        cout << "You have chosen:" response;
                        cout << "Thank you for dying with Suicide.exe.\n";
                        
                    }
                    else if (response == 'b' or == 'B')
                    {
                        cout << "Thank you for wasting time with Suicide.exe\n";
                        cout << "Goodbye.\n";
                        
                    }
            {
    return 0;
}

I switched from Dev-C++ to wxDev-C++ so I'm not sure if it should be different or if I'm just missing a simple error.
Not familiar with Dev C++, but it look's like you got a ; miising at the end of line 7.
I'm pretty sure it's just the IDE/compiler, so it shouldn't make a difference. That semicolon fixed a decent amount of code though, now it's giving me errors at line 43
I have the code to the point where I dont get error messages, but now after I give input at the first cin the program just closes rather than displaying the next cout. Any fixes?
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
#include <iostream>

using namespace std;

int main ()
{
    char response;
        cout << "Hello. My name is Suicide.exe. Would you like to end it all today?\n";
        cin >> response;
            if (response == 'y' or response == 'Y')
            {
                cout << "Which of the following methods would you like to apply?\n";
                cout << "A. Gun\n";
                cout << "B. Knife\n";
                cout << "C. Potato\n";
                cin >> response;
                    if (response == 'a' or response == 'A')
                    {
                        cout << "You have been shot to death. Thank you for dying with Suicide.exe.\n";
                    }
                    else if (response == 'b' or response == 'B')
                    {
                        cout << "You have been stabbed to death. Thank you for dying with Suicide.exe.\n";
                    }
                    else if (response == 'c' or response == 'C')
                    {
                        cout << "Potatoes are not a valid form of suicide. Thank you for wasting time with Suicide.exe.\n";
                    }
            }
            else if (response == 'n' or response == 'N')
            {
                cout << "Would you like to:\n";
                cout << "A. Discuss alternatives\n";
                cout << "B. Exit\n";
                cin >> response;
                    if (response == 'a' or response == 'A')
                    {
                        cout << "Which alternative would you like?\n";
                        cout << "A. Suicide\n";
                        cout << "B. Suicide\n";
                        cout << "C. Suicide\n";
                        cin >> response;
                        cout << "You have chosen:" << response;
                        cout << "Thank you for dying with Suicide.exe.\n";
                    }
                    else if (response == 'b' or response == 'B')
                    {
                        cout << "Thank you for wasting time with Suicide.exe\n";
                        cout << "Goodbye.\n";
                    }
            }
    return 0;
}
Topic archived. No new replies allowed.