Adding elements in to a vector

Hi,
I am trying to write a simple program where trying to push_back the elements in to a vector.I am getting an error in the vector file:
bool _Inside(const _Ty *_Ptr) const
{ // test if _Ptr points inside vector
return (_Ptr < this->_Mylast && this->_Myfirst <= _Ptr);
}
How to overcome this problem?

Thanks in advance.
You get an error in that function because your code is wrong. Show your code instead.
I guess _Mylast is a pointer to one past your last element and _Myfirst is a pointer to your first element, correct?

What kind of error do you get? In which line it occurs?

What type is _Ty?

Where is the push_back code?
Insufficient information .. past your code .
Topic archived. No new replies allowed.