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
These were two methods I tried. Both are fine to use.
int main() { int size,temp; cin>>size; vector ar(size); //method 1 for(auto i=0;i>temp; ar.insert(ar.begin()+i,temp); } for (auto i:ar) cout <>ar[i]; } for (auto i:ar) cout <