If statement troubles

Hey guys,
I'm a very nooby and inexperienced programmer and am trying to get some concepts through. This script is supposed to tally the amount of votes placed into vote 1, 2 and 3. It is to accept any number of votes, but to finialise voting and print the results at the entry of 0(mine probably allows the same with any number besides 1, 2 or 3, but fixing that is easy). Everything seems to be in working order so far except the if statement, and no matter how I really word it, I struggle with it. +If it's something really stupid i promise to take a break for a while. xD


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
#include <iostream>
using namespace std;
int main()
{
    int vote1=0, vote2=0, vote3=0, poll;


cout<< "\n----------Welcome to the Poll!-----------";
cout<< "\n\n\\\\\\What do you think? 1, 2 or 3?/////\n\n";
cin>>poll;

while (poll != 0);
{
    if (poll == 1)
    {
        ++vote1;
        cout<< "\nThank you for your vote!";
        cout<<"\nNext vote please. 1, 2 or 3?\n";
        cin>> poll;
    }
    if(poll == 2)
    {
        ++vote2;
        cout<< "\nThank you for your vote!";
        cout<<"\nNext vote please. 1, 2 or 3?\n";
        cin>> poll;
    }
    if(poll == 3)
    {
        ++vote3;
        cout<< "\nThank you for your vote!";
        cout<<"\nNext vote please. 1, 2 or 3?\n";
        cin>> poll;



    }
    cout<< "\nThank you for your votes.\n";
    cout<< "\nOption one ended on " <<vote1<< " votes, 
Option 2 ended on " <<vote2<< " votes and 
Option 3 ended on "<<vote3<< " votes.";
}



    return 0;
}
Remove the semicolon after the while statement on line 12.
goddd dangggittt, haha, thanks a lot man :)
Topic archived. No new replies allowed.