checking vector size

guys,

i have a vector and i am implementing it with push_back() function. how can i check the size of that vector later?

because i am using the function size() and it`s returning me segmentation fault

any hints?

thanks
size() is the right function. If you get a segmentation fault, you're messing up somewhere else.
post us the code.
Segmentation faults happen a lot when you're trying to access an element outside of the bounds of a container. Are you attempting to access the element at .end()?
Topic archived. No new replies allowed.