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
If you know the size of the vector you can do it like this:
#include using namespace std; int main() { int n; cin >> n; vector v(n); for (auto &it : v) { cin >> it; } }