Question about 'getline' ?

So, its like this...

i have a bunch of arrays which i fill thorugh user input. But i have a problem with a string array...
when i use a 'getline(cin, blabla[i]);'
i have problems getting into a new line for the next input, basically it messes up two of my inputs and the input for the int array and the string array, and then the integer from int array is included in the string array... :S

Heres a part of my code...
1
2
3
4
cout << "Enter Competitor: " << endl;
getline(cin, competitors[a]);
cout << "Enter score: " << endl;
cin >> score[a];


and when i run it opens like:

Enter Competitor:
Enter score:
_


How can i fix this so i can enter each value, press enter and proceed to the next one?
why don't you try this:
 
cin.getline(competitors, a);

Just a friendly suggestion.
Topic archived. No new replies allowed.