adding vector indexes

I am taking input of 1,2 or 3 from user and storing them in the vector. I want to add the 1s,2s or 3s and get the cout the results of majority, secondary and third positions. I have completed till taking the inputs and storing in the vectors and displaying the vector, but not getting any idea of getting the results. Can any one please help me out on the logic!!

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
#include <iostream>
#include <vector>
#include <conio.h>

using namespace std;

int choose ();

int main()
{
    vector <int> vote;
    for (int i=0; i<5; ++i)
    {
        int choice = choose();
        vote.push_back(choice);
    }
    for (int i=0;i<vote.size();++i)
    {
        cout<< vote[i] << endl;
    }

_getch();
}

int choose ()
{
   int x;
   cout<< "Enter your choice, 1,2 or 3:  ";
   cin>>x;
   return x;
}
Topic archived. No new replies allowed.