As mentioned in the title, on debugging C++ code an Exception occurred(as seen in the picture). How can I overcome it?
It's my code that induces Exception.
#include <iostream>
#include <vector>
int main()
{
int t;
std::cin >> t;
std::vector<int> v(t);
for(int i = 0; i < t; i++)
{
std::cin >> v[i];
}
for(const auto& e : v)
{
std::cout << e << '\n';
}
return 0;
}