Answer:
Replace /* Your solution goes here */ with:
cin>>matchValue;
numMatches = 0;
for (i = 0; i < userValues.size(); ++i) {
if(matchValue == userValues.at(i))
{
numMatches++;
}
}
Explanation:
This line gets input for matchValue
<em>cin>>matchValue;
</em>
This line initializes numMatches to 0
<em>numMatches = 0;
</em>
The following iteration checks for the number of matches (numMatches) of the matchValue
<em>for (i = 0; i < userValues.size(); ++i) {
</em>
<em>if(matchValue == userValues.at(i))
</em>
<em>{
</em>
<em> numMatches++;
</em>
<em>}
</em>
<em>}
</em>
<em>See Attachment for full source code</em>