I need help with my program using vectors. The error comes when you input a decimal. After entering a decimal, the program accepts no input and runs to the end. Also, the average does not output a decimal even if all inputs are integers.
Do you have any idea what you floating point precision is set to? Or how strict your compiler is being told to adhere to it? For Microsofts compiler the command line option is "/fp:<fast | precise | strict>". If that is set it could would have an effect on your program as well. I can't think of what the GCC command is.
It looks like the very first cin >> scores[x] is failing. I'm not sure why. It works for me. Maybe cin and cout are linked too tightly? You could try adding cin.clear() before cin >> scores[x].
There are two bugs in addVector(). You need to initialize summ and you aren't adding all the members of the vector.
In both addVector() and display(), I would use scores.size() for the end of the loop so the code will work regardless of the size of the vector. That way if you wanted to change the number of scores, you'd just have to change the code in getScores().