Here is a piece of premade code i wanted to change to get familiar with vectors.
Its about computing the average of numbers the user typed into the programm.
But it doesnt work. I think there is an logical error somewhere when adding data to the salaries vector. I dont know. Maybe you could have a look?
all is well but where are you calculating the average. your between function will give all the numbers between 45k to 65k. now in your last for loop you need to add all the salaries and divide it by the size of midrange_salaries.