Hello, I am working on a project, and I keep getting the Vector Iterators Incompatible. Perhaps someone here knows what is going on. I am trying to use the erase function from std::vector and it results in this error every time. Since my project is starting to get really complex, I created a console application simplifying what I am really trying to do.

Code:
#include "stdafx.h"
#include <vector>

using namespace System;
using namespace std;

int main(array<System::String ^> ^args)
{
    vector<vector<int>> vecvec;
    vector<int> vec;

	for(int i=0;i<10;i++)
		vec.push_back(i);
	
	vecvec.push_back(vec);

	vector<int>::iterator it = vecvec[0].begin();

	bool Found=false;
	while(it!=vecvec[0].end()&&Found==false)
	{
		if((*it)==5)
		{
			Found=true;
			vecvec[0].erase(it);
		}
		else
			it++;
	}

    return 0;
}
What I am trying to do is erase a single integer element from a vector which is inside another vector. I do have the index of the desired vector in which I want to search. Am I declaring wrong the iterators? The problem is when the program tries to erase the element, otherwise it works perfectly because it does find the desired element.
Thanks in advance for the help.