why won't this compile?...
but this willCode:void main()
{
vector<int> v;
//add 100 elements to a
v.erase(4); //or v.erase(non-pointervariables)
}
Code:void main()
{
vector<int> v;
int *i;
*i = 5;
//add 100 elements to a
v.erase(i);
}
it just doesn't make any sense to me why it will only take a pointer?