I\'m trying to ask the user to enter numbers that are put into a vector, then using a function call to count the numbers, why is this not working? I am only able to count t
The initial size() of V will be 0, while int n contains any random value because you don't initialize it.
size()
V
V.size() < n is probably false.
V.size() < n
Silly me missed the "Enter the amount of numbers you want to evaluate: "
"Enter the amount of numbers you want to evaluate: "
If you enter a n that's smaller than V.size() at that time, the loop will terminate.
n
V.size()